https://ezuwnnu.pages.dev/posts/understanding-debouncing-and-throttling-in-javascript/
Understanding Debouncing and Throttling in JavaScript