A plea for speeding up the "select resource" drop down in search

When I'm conducting a search, it currently takes between 10.3s (cached) and 18.5s (uncached) to populate the dropdown menu where I can specify which resources I want to search in. The menu lists Open Resources, Collections, Tags, Ratings, and Series, but the code is clearly also reading in every book from my library to make the filtering quicker.
Looking at ProcessMonitor, pretty much all the time is spent querying catalog.db, but:
- It should only take a fraction of a second to run a query on catalog.db
- catalog.db is already cached to display the library. Cannot this cache be consulted?
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
Comments
-
Mark Barnes said:
When I'm conducting a search, it currently takes between 10.3s (cached) and 18.5s (uncached) to populate the dropdown menu
This takes about 1s on my system. (My library shows 4561 resources.)
Just wondering: does your anti-virus do active scanning of files before opening? I set the entire Logos4 directory (with subdirectories) in my 'Exclusions' list in Avast for its "Real Time Scanning."
Help links: WIKI; Logos 6 FAQ. (Phil. 2:14, NIV)
0 -
[Y] Logos User Voice suggestion => Improve Logos 4 Menu Responsiveness
Keep Smiling [:)]
0 -
Richard DeRuiter said:
This takes about 1s on my system. (My library shows 4561 resources.)
Wow. I have a few more (6,622), but that doesn't explain the differences. Maybe there's some kind of bug where 5,000 or 6,000 resources pushes it over the edge and it gets horribly slow.
Can I ask what happens to Logos' memory usage when you click that menu? Mine goes up an additional 380Mb every time I click on it (the memory is released when I execute a search).
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
Mark Barnes said:
When I'm conducting a search, it currently takes between 10.3s (cached) and 18.5s (uncached) to populate the dropdown menu where I can specify which resources I want to search in.
I've noticed this, too. When doing a Bible search it takes about 16 seconds to populate the list so I can choose a Bible. I don't know what can be done, but perhaps cache the last list generated and only reset the cache if I change collections or add resources. Something, at any rate to make this almost instantaneous.
Pastor, North Park Baptist Church
Bridgeport, CT USA
0 -
Mark Barnes said:
Can I ask what happens to Logos' memory usage when you click that menu? Mine goes up an additional 380Mb every time I click on it (the memory is released when I execute a search).
It's kind of hard to tell, because it goes so fast, but it doesn't look like the Private jumps more than about 10MB, and the Commit much more than 20GB. My entire Private RAM usage on the Resource Monitor in Win7 is 381GB, and in Commit is 458GB (both with L4 idle), Working Set is at about 485GB.
My physical memory is at about 65% (of 6GB RAM), because I have a lot running at the same time at the moment.
Are you running any guides, or anything else that might be using the library cache? (Another wild guess.)
Help links: WIKI; Logos 6 FAQ. (Phil. 2:14, NIV)
0 -
Mark Barnes said:
When I'm conducting a search, it currently takes between 10.3s (cached) and 18.5s (uncached) to populate the dropdown menu where I can specify which resources I want to search in.
I'm not able to reproduce this delay (on a test system with thousands of resources and several hundred custom collections).
Are you in Basic, Bible, or Morph Search? (Roughly) How many collections, unique tags, open resources do you have?
0 -
I reran this a few times and noticed the only time the delay comes up is the first time I open the Search dialog box. after opening Logos After that caching seems to occur and the drop-down list populates almost instantaneously. Sometimes upon opening Logos 4 I have almost no delay in the list being populated from the start. There must be something in the background causing the delay when I notice it. I did not monitor what else was going on in the background.
Pastor, North Park Baptist Church
Bridgeport, CT USA
0 -
Mark my experience is about the same as Richard. I wonder if it has more to do with the number of collections and tags you have.
0 -
I've noticed this recently too. Here's a log file from 4.5a Beta2 when it took 13 seconds just to populate the list of Bibles in a new Bible Search tab: 800067.Logos4.log
Disk hits are going through the roof during this time. Why? Shouldn't this list be created and cached for future use shortly after boot-up during some idle time, as it's one of the most likely-to-be used lists in Logos, and isn't likely to change often.
0 -
Bradley Grainger said:
I'm not able to reproduce this delay (on a test system with thousands of resources and several hundred custom collections).
Are you in Basic, Bible, or Morph Search? (Roughly) How many collections, unique tags, open resources do you have?
- The problem occurs in Basic or Bible Search. Morph Search is near-instantaneous (<1s).
- The problem occurs regardless of how many resources are open (the tests above are with no resources open).
- I have 84 collections, but I don't think the problem is with collections, because Resource Manager shows the time being spent accessing catalog.db
- I only have 14 unique tags, though 1,985 resources are tagged.
- The only things that may be slightly unusual about my library (apart from its size) is that almost every one of my resources are rated (6,432 resources), that I have a lot of PB Bibles (approaching 100), and that I have higher than average hidden resources (368 of them).
When I click on the drop-down menu I experience the following:
- RAM Usage jumps from around 200Mb to around 600Mb (the RAM is regained only when I do a search or select a resource from the menu; if I just click off the menu without selecting, the RAM is not regained).
- CPU Usage jumps to 50% (shared between the two cores) whilst the menu is being populated
- Process Monitor shows thousands of reads from catalog.db
Thanks for looking into this. It really is quite painful at the moment.
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
Rosie Perera said:
Disk hits are going through the roof during this time. Why?
I saw this and went to check on my system. I saw a similar amount of disk hits when I was doing nothing in Logos (just booted it up and literally didn't click on anything. So I decided to close Firefox and Thunderbird (the only apps I have running - except for background/tray apps like anti-virus, etc.). Disk hits went way down.
Then I ran a search. There was some disk activity, but not much. Activating the Logos window (by clicking on it to make it the foreground app), I saw a huge jump in network activity. I let that die down and clicked on the search icon and the on the "Entire Library" text. There was minimal disk activity; some but nothing like what you're showing.
Getting back to another theory mentioned, how many collections do you have? (I just counted 48 in my system)
Also how many tags? (Sorting my Library by tags, I count 26)
Help links: WIKI; Logos 6 FAQ. (Phil. 2:14, NIV)
0 -
Richard DeRuiter said:
Getting back to another theory mentioned, how many collections do you have? (I just counted 48 in my system)
Also how many tags? (Sorting my Library by tags, I count 26)
Lots (150+) and lots (750+). But I expect whatever algorithm Logos is using to be scalable (or is it scaleable?) to large datasets. If you give people this powerful system, they are going to want to use it to its full capacity. Being hemmed in by poor performance, and then getting the answer "well what did you expect? you had 150 collections" would leave one somewhat underwhelmed.
I seem to recall Bradley and I had a conversation about the number of collections I have at some other time, and he was able, nonetheless, to speed up some performance issue I was complaining about at the time (which may very well have been this one -- it seems awfully familiar) to the point where it was a non-issue for me. So either this is a regression, or I'm losing my memory and it was some other problem.
0 -
What happens to your RAM when you click on the dropdown, Rosie?
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
Mark Barnes said:
What happens to your RAM when you click on the dropdown, Rosie?
RAM usage doesn't change much:
Before clicking the dropdown:
While the dropdown is populating (a couple of seconds after clicking the dropdown):
BTW, dropping down this menu (the Bibles selection menu in Bible search) is also slow (10-13 sec) even on second, third, and subsequent drop-downs. You'd really think the contents of that list would be cached by then.
0 -
Rosie Perera said:
Being hemmed in by poor performance, and then getting the answer "well what did you expect? you had 150 collections" would leave one somewhat underwhelmed.
I get that.
However, knowing what/where the problem is would be the first step in fixing it. Right?
Help links: WIKI; Logos 6 FAQ. (Phil. 2:14, NIV)
0 -
Richard DeRuiter said:
However, knowing what/where the problem is would be the first step in fixing it. Right?
Yes, that's true.
0 -
Bradley Grainger said:
I'm not able to reproduce this delay (on a test system with thousands of resources and several hundred custom collections).
Are you in Basic, Bible, or Morph Search? (Roughly) How many collections, unique tags, open resources do you have?
Very interesting. I just tried this on my other desktop (similar specs to this one), and have a near instantaneous response. So there's something particular on this machine that's causing the problem. The only thing I can think that's different is all those PB Bibles I have.
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
Mark Barnes said:
The only thing I can think that's different is all those PB Bibles I have.
I have one PB Bible on this machine. I wonder if that has anything to do with it.
0 -
Rosie Perera said:Mark Barnes said:
The only thing I can think that's different is all those PB Bibles I have.
I have one PB Bible on this machine. I wonder if that has anything to do with it.
I do not have any PB Bibles. (If that helps.)
EDIT: I believe the PB's have their own index (right?). If so, can that index be rebuilt (and so optimized)?
Help links: WIKI; Logos 6 FAQ. (Phil. 2:14, NIV)
0 -
Mark Barnes said:
Very interesting. I just tried this on my other desktop (similar specs to this one), and have a near instantaneous response. So there's something particular on this machine that's causing the problem. The only thing I can think that's different is all those PB Bibles I have.
I don't have a lot of PB Bibles on my test system either, which may be why I can't reproduce the bug. I suppose I can try building 100 different copies of Tyndale to see if that slows things down...
0 -
Bradley Grainger said:Mark Barnes said:
Very interesting. I just tried this on my other desktop (similar specs to this one), and have a near instantaneous response. So there's something particular on this machine that's causing the problem. The only thing I can think that's different is all those PB Bibles I have.
I don't have a lot of PB Bibles on my test system either, which may be why I can't reproduce the bug. I suppose I can try building 100 different copies of Tyndale to see if that slows things down...
I only have one PB bible and am seeing this issue. Try building lots of collections instead, using tagging.
0 -
Bradley Grainger said:Mark Barnes said:
Very interesting. I just tried this on my other desktop (similar specs to this one), and have a near instantaneous response. So there's something particular on this machine that's causing the problem. The only thing I can think that's different is all those PB Bibles I have.
I don't have a lot of PB Bibles on my test system either, which may be why I can't reproduce the bug. I suppose I can try building 100 different copies of Tyndale to see if that slows things down...
PB Bibles are the culprit. (Some of the automatically-generated metadata is extremely poor, which causes this performance problem when it's read back from catalog.db.) You'll probably have to rebuild all the Bibles (once) to regenerate this metadata once the bug is fixed.
0 -
Bradley Grainger said:
PB Bibles are the culprit. (Some of the automatically-generated metadata is extremely poor, which causes this performance problem when it's read back from catalog.db.) You'll probably have to rebuild all the Bibles (once) to regenerate this metadata once the bug is fixed.
I'm glad you were able to figure out what was causing the problem. I'd be happy to rebuild my PB Bible once this is fixed.
0 -
Bradley Grainger said:
PB Bibles are the culprit. (Some of the automatically-generated metadata is extremely poor, which causes this performance problem when it's read back from catalog.db.) You'll probably have to rebuild all the Bibles (once) to regenerate this metadata once the bug is fixed.
Great. Glad you've found the problem so quickly. Thanks, Bradley.
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
This is excellent news! Mine is 10 seconds or so as well, I am glad this can be improved...
0 -
Rosie Perera said:
I'd be happy to rebuild my PB Bible once this is fixed.
The bug affects any resource with milestones (including page numbers); unfortunately, you'll probably need to rebuild every affected resource to completely fix this performance problem. (Without profiling, it's hard for me to know exactly what areas of the app will be affected, and by how much, but it would probably have a negative impact on many components that query the Library Catalog.)
0 -
Bradley Grainger said:Rosie Perera said:
I'd be happy to rebuild my PB Bible once this is fixed.
The bug affects any resource with milestones (including page numbers); unfortunately, you'll probably need to rebuild every affected resource to completely fix this performance problem. (Without profiling, it's hard for me to know exactly what areas of the app will be affected, and by how much, but it would probably have a negative impact on many components that query the Library Catalog.)
Wouldn't it be helpful then to have a command like rebuilt all PB that batch-processes these and could run by itself overnight for those with a large number of large/complex PBs?
EDIT: if you should consider building this command, you may not want to copy my typo - be free to call it "rebuild all PB"....Have joy in the Lord!
0 -
NewbieMick said:
Wouldn't it be helpful then to have a command like rebuilt all PB that batch-processes these and could run by itself overnight for those with a large number of large/complex PBs?
[Y]
0 -
I don't have PBs and experience the same problem.
0 -
Bradley Grainger said:
The bug affects any resource with milestones (including page numbers); unfortunately, you'll probably need to rebuild every affected resource to completely fix this performance problem. (Without profiling, it's hard for me to know exactly what areas of the app will be affected, and by how much, but it would probably have a negative impact on many components that query the Library Catalog.)
This is reported as fixed in 4.5a beta 3.
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
Mark Barnes said:
This is reported as fixed in 4.5a beta 3.
It's not fixed for me. I've got beta 3, and the resource dropdown in the Bible Search panel is still extremely slow.
Here's a log file for a session where all I did was boot Logos (to a layout last used which had a Search panel and nothing else), click Basic, click the resource dropdown (it was relatively quick), click Bible, click the resource dropdown (this time it took about 15 seconds), then quit Logos.
EDIT: Note that I have lots of hidden resources (over 1000) and I saw lots of mention of those in this log file. I wonder if that could be what's slowing mine down.
0 -
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
Mark Barnes said:
This is reported as fixed in 4.5a beta 3.
It's definitely fixed for me. Thanks, Bradley.
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
Much faster for me. Are we supposed to rebuild anything, or Bible PBs, or .....?
0 -
Mark Barnes said:
Well, I'd forgotten we had to do that, so I just went and rebuilt all of them and restarted Logos. Didn't make any difference. Still 15 seconds to drop down that menu.
Here's a new log file: 10311.Logos4.log
Here's a screencast of it taking 13 seconds to populate that menu:
0 -
Mine still takes about twelve seconds on cold booth. Running 4.5 Beta 4
Mission: To serve God as He desires.
0 -
On further review, if I just hit the drop down and don't type anything, it's about 12 seconds (I rebuilt my 2 Bible PBs). But now, if I type in something like "ESV", it is almost instantaneous - that aspect has improved considerably.
0 -
Rosie Perera said:
Here's a screencast of it taking 13 seconds to populate that menu:
I suspect that the length of the menu when it finally finishes has a lot to do with it.
It looks like you have a lot (150+) of collections. In a Bible Search, we filter the menu down to those collections that contain Bibles. This is calculated the first time and is cached for subsequent times the menu is dropped down.
0 -
Bradley Grainger said:
In a Bible Search, we filter the menu down to those collections that contain Bibles. This is calculated the first time and is cached for subsequent times the menu is dropped down.
Would that it were so! Unfortunately, it's just as slow on subsequent times the menu is dropped down. Any answers on that?
And I still maintain that this is the sort of "housekeeping" task that could/should be done once during user idle time sometime shortly after the program boots. I've been sitting here idle with Logos running in the background for half an hour or more while I poke around on the forums. Then I returned to Logos to drop down the menu again, and it was that slow. Do you guys do any idle time processing? On Word, we had a routine that was run whenever the program was idle, which would do housekeeping tasks like paginate the current document, autosave, etc. If it got interrupted by some Windows message coming to the app, we'd bail out and come back and pick it up later where we left off.
I suspect things work differently now with multi-threaded apps. I never did learn how to do those during my time at Microsoft. But all the more reason to have some thread just chugging away at idle tasks, which gets bumped down to lower priority when the user is interacting with the app, or some message comes from the system requiring the app to do some work (e.g., new font installed or something).
But populating this menu seems like something that you shouldn't wait to do only on demand. Do it up front and cache it, so that the user's experience with the app is much more snappy. There's no pleasure in having to wait 13-15 seconds for a menu to drop down, no matter how reasonable your excuse may be (yes 150 collections is a lot, but isn't Logos a power app that should be able to handle stuff like that scalably without noticeable degradation in performance?)
I hope I'm not being perceived as just whining. A squeaky wheel, maybe. Please give me some grease! [:)]
0 -
Bradley Grainger said:
It looks like you have a lot (150+) of collections.
150 doesn't sound like a lot to me. Given that metadata is not very reliable and that the Guide encourage small discrete units because of their sort functions, I would expect LOTS of collections.
Orthodox Bishop Alfeyev: "To be a theologian means to have experience of a personal encounter with God through prayer and worship."; Orthodox proverb: "We know where the Church is, we do not know where it is not."
0 -
MJ. Smith said:Bradley Grainger said:
It looks like you have a lot (150+) of collections.
150 doesn't sound like a lot to me. Given that metadata is not very reliable and that the Guide encourage small discrete units because of their sort functions, I would expect LOTS of collections.
Looking in ResourceCollectionManager.db file, noticed table ResourceCollections has 183 rows.
In the Collections Tool, wonder about adding a check box: "Show in Search Menu" ? (similar to "Show in parallel resources")
The Cited By tool has check boxes to filter collections, series, mytags, and ratings for Cited By use. Wonder if Cited By collection list could be used for search menu list when choosing a resource ? (perhaps in same order as Cited By show collections)
Keep Smiling [:)]
0 -
Bradley Grainger said:
I suspect that the length of the menu when it finally finishes has a lot to do with it.
It looks like you have a lot (150+) of collections. In a Bible Search, we filter the menu down to those collections that contain Bibles. This is calculated the first time and is cached for subsequent times the menu is dropped down.
I have 84 collections and the Bible Search dropdown takes perhaps 5s to populate first time, and a second or so subsequently.
This is my personal Faithlife account. On 1 March 2022, I started working for Faithlife, and have a new 'official' user account. Posts on this account shouldn't be taken as official Faithlife views!
0 -
MJ. Smith said:Bradley Grainger said:
It looks like you have a lot (150+) of collections.
150 doesn't sound like a lot to me. Given that metadata is not very reliable and that the Guide encourage small discrete units because of their sort functions, I would expect LOTS of collections.
150 isn't "a lot" - I have around 110 and I'm not using Logos professionally. Actually I wasn't expecting the collections to be a performance burden.
We are told in threads and on the wiki to build these in order to be able to manage the thousands of ressources in our libraries.
So, for commentaries alone, I have a collection for every biblical book, one for one-volume commentaries per testament, one for study bibles, one for all commentaries, then around ten for different levels of commentaries (technical, devotional etc). We're at eigthy now. I have several for the various periods of greek texts, then some to manage the Perseus and the Vyrso ressources.
Of course, Bradley, if you tell us that we shouldn't have more than a dozen collections (ten for weaker machines, twenty for the "mongo" ones), then I can act accordingly. I don't need a collection for "Judges" or "Greek texts 3rd - 5th century" today - but maybe next week or next year. But please in this case, give us the chance to set existing collections as active/inactive, so we don't need to invent/copy and taylor the dynamic rules every time.
Have joy in the Lord!
0 -
I confess that I understand little of what goes on under the hood in Logos 4. However, what I do understand is that there is an index that takes considerable time to build (and rebuild frequently with updates) and that there is a cache: so I really don't understand the kind of answers that suggest that slowdowns are due to real-time listings (collections, resources, etc).
Moreover, though it is true that I have many more resources in Logos 4 than in any other Bible software, I still think that even with few resources, Logos 4 is generally a slower beast. For instance, Wordsearch indexes topics and it is a much faster process to start with. Then searches are also super-fast. Don't get me wrong: I do think Logos 4 is by far a superior product. But I can't help but wondering if instead of blaming the legitimate number of resources, collections or normal processes, there is not really some kind of conceptual flaw to start with which make Logos 4 to act more like an elephant (strong but slow) than a jaguar (strong but agile).
I help regularly folks with very few resources (e-Bibles with something like 50 books) and I can tell you that "super-fast" has never been a word that came to mind to describe the responsiveness of Logos 4.
0 -
NewbieMick said:
Of course, Bradley, if you tell us that we shouldn't have more than a dozen collections
I'm not saying that at all.
0 -
Rosie Perera said:
Unfortunately, it's just as slow on subsequent times the menu is dropped down. Any answers on that?
No, sorry. With 500+ collections, I can reproduce a medium delay (<10s) the first time I open the menu; it's then almost instantaneous the second time. I can't reproduce the problem you're describing.
On further review of your logs, it looks like collections are only contributing two seconds to the time it takes to open the menu, so I retract my previous comments about a "large" number of collections.
0 -
Bradley Grainger said:Rosie Perera said:
Unfortunately, it's just as slow on subsequent times the menu is dropped down. Any answers on that?
No, sorry. With 500+ collections, I can reproduce a medium delay (<10s) the first time I open the menu; it's then almost instantaneous the second time. I can't reproduce the problem you're describing.
On further review of your logs, it looks like collections are only contributing two seconds to the time it takes to open the menu, so I retract my previous comments about a "large" number of collections.
Is there any further diagnosis you can do if I do the more advanced type of diagnostic logging? Could you remind me how to enable that?
0