HackTimer
HackTimer copied to clipboard
excessive memory leaking
over time, if used for a really long time (8-36 hours) this causes a webpage to become incredibly slow. tested with and without on a project and the speed does not drop if hacktimer is not included.
thank you for reporting. i will try to find out and fix it.
FYI: I reckon it's because the callback map is not cleared on successful setTimeout callback. For setTimeouts, the callback map should be cleared even if clearTimeout is not called explicitly.
Thanks to @timotheeg, there was such a mistake of not deleting unused timeout entries. Commit e11f3ed2292062ee1e1aafe3510802a889ea6f96 must fix it.
I'll give this a try sometime later and see if it's still causing problems. If so, I'll let you know. Thanks!
In commit e11f3ed2292062ee1e1aafe3510802a889ea6f96 I forgot to update silent version (HackTimer.silent.min.js) (issue 13) that you used (package.json). So it was not fixed that time. Now it is updated (8e2fef9429ec427a54d8b407a2f1130b5a811098, c06bbc674e3c49d9c250e5890724cbf007c53388).