Optimizing Performance With Throttling in JavaScript
Too Long; Didn't Read
Some browser events have an extremely high-frequency rate. The number of events such as cursor moving, scrolling, resizing the browser window, holding down a key, etc., can reach 100 times per second. To reduce the load on the browser, you need to use throttling. Throttling allows you to "slow down" the function, i.e. the function will be executed no more than once in the specified period.