What is the routine for the basic seek-as-you-type Find box called & where is it located?
If there is a proper nomenclature for this feature, I’d like to use it in the wiki. (If the term is somewhat unique then it will be more wiki searchbox friendly too!)
But the other side of locating the routine is that this feature becomes almost unusable in large trees.
Found a resolved bug report where the following module threw an error:
It seems to reinitialize an uninterruptible search for every keystroke. If you quickly type a 10 keystroke Seek parameter, it appears to try doing a full search 10 times instead of 9 immediately interrupted searches & 1 complete search.
It is VERY slow in showing the keystrokes & often timesout before completing the last one.
So I’d like to do some private experiments. Mostly inserting more places where it can interrupt what it was doing & start again.
I believe that this is a feature of GTK. It is slow because Gramps uses a pretty complex caching structure to maintain all the data on a view. Form some types of GTK views, GTK has all the screen data in its own internal structures. But for Gramps, where lines can change due to updates from other views we have GTK hold pointers to our own data, which is incomplete and needs to be reloaded from cache or disk and then formatted for the screen again. So a find type of operation which looks at everything in the view (not just the local window into the data) can be slow.
I don’t mind the search itself being slow. It is the multiplying of the slowness that is bothersome.
Even if that text box had a 1/4 second delay allowing another keystroke to be keyed (before starting the search) was inserted, the overall search time would be dramatically reduced.
As it exists now, the only way to get reliable & reasonable performance is to:
- compose the search string externally (like in notepad or a Browser’s URL box)
- Copy the composed string to the paste buffer
- Use the Ctrl-F keybinding to open the searchbox
- Paste the composed string into the searchbox
Pretty much defeats any search-as-you-type functionality.
As an example, my Tree has a LOT of people named “Charles Thompson”. If I want to switch focus to my grandfather, then the Ctrl-F search term has to be “thompson, charles o”. I cannot even get the Ctrl-F box to ACCEPT that many keystrokes before it timesout & disappears. The type-ahead cache only processes about 10 of those keystrokes before it goes away. But, if I PASTE that string, it works every time.