DEV Community

Discussion on: Debouncing in Javascript.

Collapse
 
_genjudev profile image
Larson • Edited

My customers would go crazy if they wait. Debouncing should be limited to a few miliseconds. The user needs the answer right away. Search in google and wait for the results. You would go crazy too. If you realy have problems with your traffic try to cache API results on a server like redis. Have multiply API endpoints in different locations.

Your post is good!

Collapse
 
abhishekjain35 profile image
Abhishek Jain

Hey Lars, The 1 second delay is just for example. I just wanted the reader to visualise how denouncing works. But in real world the delay is always below 400ms. 🙂🙂

Collapse
 
devdaksh profile image
Daksh Kulshrestha

a simple hack: set a good amount of delay and when users get mad, wait for a day or so and remove the delay and tell them you worked hours to fix the bug.

Collapse
 
_genjudev profile image
Larson

And repeat next week.

Collapse
 
abhishekjain35 profile image
Abhishek Jain

Modern problems require modern solutions 😆 😆

Collapse
 
bantya profile image
Rahul Thakare

Best tip ever. 💯