Improve incremental search behavior to process searches immediately on enter/return and potentially be adaptive for automatic submission delay
Categories
(Webtools :: Searchfox, enhancement)
Tracking
(Not tracked)
People
(Reporter: asuth, Unassigned)
References
Details
Quoting my proposed follow-up in https://bugzilla.mozilla.org/show_bug.cgi?id=1779672#c10
Adaptive incremental search timing using localStorage and honoring the enter key
Right now we use a hard threshold of 300ms, but it's possible to gather statistics locally on the the timing between characters to generate a potentially more appropriate threshold for users. This is primarily of benefit for the user because un-scientific sampling suggests that it's actually rare that different user's requests collide and instead that a user's own requests will self-collide. For a user where their typing rate is say, 350ms per character, they will generate pathological load for themselves, so having the cut-off be adaptive would be helpful.
The heuristic would also want to be aware of the enter key. For users where they end the query by pressing the enter key (in a timely fashion) with high probability, it potentially makes sense to to set the incremental timer much higher with the assumption that the enter key is likely coming. The enter key would of course force the submission of the query immediately. (And should probably pass cancelFetch=true).
Description
•