cockpit-project / cockpit-files

A Featureful File Browser for Cockpit (Modernized and tested version of https://github.com/45Drives/cockpit-navigator)
GNU Lesser General Public License v2.1
46 stars 26 forks source link

Filtering a large directory is janky #669

Closed subhoghoshX closed 2 months ago

subhoghoshX commented 2 months ago

Open a large directory like /bin and start typing. There's a significant delay in the characters appearing or disappearing when you type or press backspace.

subhoghoshX commented 2 months ago

My initial intuition is to use useDefferedValue(). I'll try to look into it.

garrett commented 2 months ago

Shouldn't you just do standard throttling / "debounce" on the input? So it sets a very short timer while typing and the timer is reset on each key, basically, so it doesn't update on each keystroke?