Details
-
Improvement
-
Resolution: Done
-
Neutral
-
None
-
None
-
-
Empty show more show less
-
Foundation 3
-
5
Description
Whenever a search has been triggered, there's no way to stop it with the current API. In a situation where results will never be needed anymore, this is a waste of resources and in particular delays new searches.
What Find Bar does in such a situation (e.g. after a search has been triggered after user input, but a subsequent one too because the user typed ahead) is to just ignore any obsolete results coming in and wait for the new ones. If a user manages to type at roughly the same frequency as input debouncing (5 chars per second), many sequential searches are triggered, leading to a queue and considerably delaying final results.
Potential solution:
Add a method to Periscope to cancel a running search (e.g. by some identifier, or some other handle). Internally, we could just avoid starting queued search threads, and potentially kill current ones (but that may be dangerous too).