MrViolets / Deep-Tab-Search

Chrome extension that lets you search the content of all your open tabs.
https://chromewebstore.google.com/detail/dbppkkjmaloclihjakcpnionomlidbhk
GNU General Public License v3.0
126 stars 7 forks source link

Debounce onSearchInput #10

Open zolrath opened 4 months ago

zolrath commented 4 months ago

Currently while the user types input into the search bar the search event fires for every keypress. If they type the word "Hello" this means that 4 wasted searches are performed and displayed for a fraction of a second until the 5th and final search is displayed.

In a system with hundreds of tabs this greatly improves the responsiveness.

MrViolets commented 4 months ago

Thanks for the PR @zolrath. I'm interested to hear more about the lack of responsiveness you might be experiencing, the extension was designed specifically to be fast even with many tabs open and so the lack of debouncing the input was a conscious decision.

zolrath commented 4 months ago

Here's an example of typing "Elixir" and experiencing lag.

I type the entire word, then the individual results for "E", then "El" then "Elixir" are rendered one after the other instead of only displaying the final search term.

https://github.com/MrViolets/Deep-Tab-Search/assets/454563/7cd41d78-b96e-44de-8b73-572d002d4f2d