Typing fast on the search box causes web app to stutter
Created by: limitedmage
Repro steps:
- Navigate to a big page, eg. https://sourcegraph.com/github.com/sourcegraph/sourcegraph/-/compare/HEAD~40...HEAD?visible=90
- Type fast on the search bar
Expected: typing works fine Actual: web app stutters, typing lags
Every component in the page seems to be re-rendered on every keystroke due to the QueryState
changing.
I tried debouncing changes to navbar QueryState
, which fixed the stuttering but broke the search box autocomplete.