mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 09:42:56 +00:00
On a slow machine, the preset list is painfully slow to search, as it rerenders the list on every keystroke, which takes several hundred milliseconds. By debouncing this, it is able to keep up. Performance analysis: Before: Typing the word 'stream' results in a 2.5s frame according to Chrome's profiler. Each input event takes between 300 and 600 ms to run. After: Typing the word 'stream' results in three 300ms frames. The first and last input events take around 200ms, while the four in the middle are ignored by the debouncer.