It’s the second form that I have that seems to be the point where things hang up, meaning I see a prof:dump() message before that call and not the prof:dump() message that follows it, but I’m also passing in potentially 10s of 1000s of node IDs, which is probably not optimal.

 

I tried rewriting the code to do them individually but that didn’t really seem to help, which was not a surprise.

 

My current code is taking Oxygen validation reports, which consist of sets of “incidents”, where each incident is associated with a specific document. I have a separate index that associates documents to their containing “bundle” DITA maps. I then build a map of incident element node IDs to bundle names from which I can then build an HTML report of incidents grouped by bundle. So my code is iterating over the keys in this map (bundle names), getting the set of node IDs of incident elements, and then processing those incident elements to build the HTML report entries.

 

I now realize that this map-based approach is suboptimal and I should just build the map as a separate XML document that I can build in the background and persist along with my other indexes and then just render it. That is, whenever I ingest a validation report I can just build the bundle-to-incident document then and not try to reconstruct it when users request the report.

 

I’ll pursue this re-implementation.

 

Cheers,

 

E.

_____________________________________________

Eliot Kimber

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com

LinkedIn | Twitter | YouTube | Facebook

 

From: Christian Grün <christian.gruen@gmail.com>
Date: Thursday, March 3, 2022 at 9:16 AM
To: Eliot Kimber <eliot.kimber@servicenow.com>
Cc: basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de>
Subject: Re: [basex-talk] How Best to Determine What BaseX Is Doing When It Pegs the Processor?

[External Email]


> Based on that work it appears I may be causing problems by trying to load large numbers of nodes using db:open-id().

If you have numerous single db:open-id calls, you could potentially
reduce them to a single call:

  db:open-id($db, $sequence-of-ids)