Hi Eliot,
Using the where-used index to calculate the doc-to-bundle index, it takes about 50ms per topic or map to determine the bundle (on my laptop), which is still 10x slower than I’d like but certainly tolerable (at 50ms per topic it takes about 7.5 minutes to process 9400 topics).
50 ms for a single index lookup sounds pretty slow. Two suggestions:
• You could check if the index is up-to-date, and that it’s actually used. • If you use additional parent steps to navigate to the final element, you could store the id of the element node in your index instead of the text node id. • If your index keys exceed a certain maximum length, a sequential search will take place, so it might be helpful to increase that limit [1], either globally or e.g. via db:create(..., map { 'maxlen': 256 })
Cheers, Christian