-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
I played with various searches and made some progress. For example 3 of my 12k notes have the cvho keyword in them. If I type very quickly the cvho keyword, mobile search is instant. But if I type a little slowly, e.g. cv then little pause then ho, it takes 30sec and the search animation starts at the little pause after cv.
Ftr a “cv“ search takes 30sec likely due to several hundred results. But I don't care because my searches are usually very specific, only a few notes match.
This seems related to “search as you type“ feature. When I resume typing after a little pause, it shoud immediately abort old search and start new one, but it doesn't. Instead it waits for old search to complete (cv 30s) then only runs new search (cvho <1s).
We could try this:
- Can the current search be cancelled if the user types another letter?
- Why is it slow? I assume FTS is still fast but maybe we are building a list of thousands of notes - should we limit how many we return?
- If all this is not possible, we could add a longer delay before auto-search for the first one and two characters - it's probably very rare to search for just one or two letter so we should assume the user will type more letters after that and wait a bit longer.
- Or: we don't support auto-type for the first two letters - the user needs to press Enter. But we do for the next ones