When do you stop optimizing a frontend algorithm and just change the product behavior?

Hey folks, I’m working on a search-as-you-type picker in a React app and I’m trying to keep it snappy on low-end laptops while the dataset can spike from 5k to 200k items.

Right now we do fuzzy matching + scoring on each keystroke and even with debouncing it sometimes locks up the main thread; indexing helps memory but makes updates slower and adds complexity. How do you decide the cutoff where you stop chasing algorithm tweaks and instead change UX (server-side search, minimum chars, pagination, “press Enter to search”) to keep a performance budget predictable?