I've been running some tests on the parallel resource menu, as I'm really struggling with it's efficiency. I rely on it heavily in my work flow, and it's a real bottleneck (rather than opening commentaries/dictionaries from a PG or BWS, and have dozens of tabs, I like to select one at a time from the PR menu).
I decided to run some benchmarks with Process Monitor running. I know very well that gives me only the smallest insight into what Logos is actually doing, and lots of my guesses will be quite wrong. I'm also certain that some things that seem daft to end-users have perfectly logical and sensible explanations.
Nevertheless, there seems to be a huge amount of inefficiency in the parallel resource look up given that there are indexes to all the headwords.
This is for created a PR menu from Enuma Elish in AYBD, but it wouldn't really matter. (I've run this test several times before benchmarking, so this is best case scenario - my Windows cache is well and truly primed.)
- First, Logos searches through each of my collections which have "Show in Parallel Resources" to see whether AYBD appears in any of them. Time taken is 2.6691 seconds.
- Second, Logos queries catalog.lxn, which seems to be for word-stemming (takes about 0.2 seconds).
- Third, Logos gets a list of all resources with the same type as the one we're looking up the PRS for (I'm presuming this). This proved not to be true (see inefficiency 3 below).
- Fourth, for every resource with this type
- Logos access the resource and reads several thousand bytes of data. Time taken = 0.005s.
- Logos queries the index (these are the .mstidx files). Time taken = 0.005s.
- Fifth, if the resource is found in the index, the resource is accessed again = 0.004s
- Sixth, the Library Catalog is accessed, probably to get cover images and book names. This takes 0.6 seconds.
- Seventh, a series of apparently random books are all accessed. In this test, it included several volumes of Holman's commentaries, the Logos Hymnal, 1000 illustrations, (see inefficiency 3 below)
Likely Inefficiency #1: During stage 1, nested queries aren't cached, so several queries
run multiple times. In my case that means 14 unnecessary queries taking
a total time of 1.357s (50.8% time wasted).
Likely Inefficiency #2: Most of the resources don't contain a reference to be looked up. Yet despite this the resource is always access, even before the index is checked. Why? 0.005s doesn't seem like very much, but if you have 1,300 commentaries, as I do that's 6.5 seconds seemingly wasted.
Likely Inefficiency #3: During stage 7, dozens of resources are looked up, even though they'll never appear in the PRS. They contain a headword index, but they're of the wrong type (monographs or commentaries) so they'll never appear in the list. If they won't show up, why bother searching them?
Likely Inefficiency #4: None of this is cached, so if I do a lookup on the same headword from a different resource a few seconds later the whole process will run again. But surely there's no need. If the headword is the same, the results will be the same. Likewise if I do a lookup on a different headword from the same resource, then steps 1 and 3, and part of step 6 can be cached.
Like I said, I could be barking up the wrong tree entirely, and if so I'm sorry. But this is born out of frustration of a great feature that is frustratingly slow, and for which I long to improve.