Debounce: 50ms is too short (barely any optimization, API still called on almost every keystroke). Use 300ms. Throttle: 10ms is too aggressive (barely any rate limiting). Use 100ms for scroll, 50ms for mousemove.
What delays are too short for debounce and throttle?
More FAQs in Debounce vs Throttle: Common Mistakes
Because debounce delays execution until scrolling stops. The user sees no feedback during scrolling, which feels laggy. Use throttle instead for continuous feedback at a controlled rate.
Because throttle runs during typing, causing multiple API calls (e.g., 2-3 calls for typing 'hello'). Debounce waits for typing to stop, making only 1 call. Use debounce for search.
Because the returned function may be called in a different context (e.g., as an event listener). Without fn.apply(this, args), the original function loses its this binding and arguments. Always use apply and rest/spread.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.