PDA

View Full Version : Switch tabs without reloading search item results


aaronjsolomon
07-18-2019, 11:57 AM
Hi,

Switching tabs away from a search item, and then back to it, causes the results to disappear (and re-generate, if "Automatically start saved search when search item is selected" is enabled).

I have a particular search item that produces my to-do list, and I constantly switch tabs between this item's tab, and other tabs. Unfortunately, if this search takes several seconds to run, it makes fast switching between tabs frustrating.

Is there a way to "cache" the search results in a given tab, so that tab-switching away from, and then back to, a search item does not re-run the search, nor clear the results, but show the previous results before the switch?

I notice that browser windows do retain the page's state (scroll position, etc.) when switching between tabs, though they do refresh when navigating away and back to their item in the Data Explorer. Ideally, search results could be configured to mimic this behavior.

Please advise, many thanks.
Aaron

kinook
07-18-2019, 12:21 PM
There is a separate browser instance for each tab, but just one Search Results pane (which also doubles as the Child Items pane) for all tabs, so it does have to reload that pane when switching tabs. Caching the information would be tricky and possibly stale anyway. Could you speed up that search, maybe by scoping the search area or simplifying in some way?

aaronjsolomon
07-23-2019, 06:22 PM
I don't mind that the data would be stale, but it sounds like a significant architectural change, and I don't feel entitled to it! :)

I've actually spent a ridiculous amount of time tweaking the searches for my personal GTD system to get them to run as fast as possible, using many different approaches, and I'm confident I've hit the limits of that type of optimization. (I have a background as a SQL developer.)

So, it would still be very useful, despite the potential of showing stale data. Knowing that navigating away from a tab will result in having wait for search results to load again makes me generally hesitant to move around the interface as freely as I otherwise would, or build queries as sophisticated.

As always, many thanks for your response, and for the great software!

Cheers, Aaron

kinook
03-28-2021, 05:17 PM
So it turns out there is actually an undocumented search cache feature (UseSearchCache) that should accomplish what you're looking for. I have now documented it at https://www.kinook.com/Forum/showthread.php?t=5097