Hi,
I am using tweenmax in my reactJs project and while working on the performance optimization, I ran the following script in console which shows the number of active setTimeOut calls.
window.originalSetTimeout = window.setTimeout;
window.originalClearTimeout = window.clearTimeout;
window.activeTimers = 0;
window.setTimeout = function(func, delay) {
window.activeTimers++;
console.log('> set', window.activeTimers);
return window.originalSetTimeout(func, delay);
};
window.clearTimeout = function(timerID) {
window.activeTimers--;
console.log('>> clear', window.activeTimers);
window.originalClearTimeout(timerID);
};
If we just import tweenmax, infinitive setTimeOut calls start getting triggered. We dont even have to use the library, just importing it alone causes so much action to calls. Can you please help me look into this issue?