howler.js
howler.js copied to clipboard
Performance issues with Howl().play() creating Event Leaks?
I'm getting Event Leaks related to howler.js
I have been trying to chase down an Event Handler Leak (parabolic creation of Listeners)
Steps to reproduce:
-
Download https://github.com/LAGameStudio/lawg
-
On a local machine, load index.html into Chrome
-
Open developer tools
-
Start profiler (under Performance)
-
Refresh page after 2 seconds (arbitrarily)
-
Don't shoot for a number of seconds (mental note)
-
Shoot one bullet, wait 5 seconds, shoot 2 bullets -- this is done with CTRL key
You can see that the number of listeners created by Howler is crazy huge, like 207 for one or just a few played sounds in one test I performed. I'm tracking down other issues perhaps (the performance decreases readily) but I noticed this huge number of listeners...
Maybe i'm crazy
I personally also experience memory leaks when using howler, but not sure if that's the exact cause
Yeah this is still unresolved on my end. Even with memory pooling the performance lags in chrome. If I resize the browser window slightly, it then does GC and everything is fine.
Does anyone have a simpler test case of the event listener build up? I've done some testing on the included howler examples and am not seeing an issue so far.
I believe it's an issue with the way Chromium handles Audio. Since it can be easily reproduced by just playing songs, and skipping them, I've personally managed to handle this memory leak quite well, by switching to html5 audio instead, less increase in memory, but still some kind of increase, quite of a strange bug.
I'll do some investigation tomorrow and see if I also get those huge amounts of listeners like h3rb said
Any updates here? Seeing similar behavior.
I also experience memory leaks when using howler. Loading new audio after another creates leaks over 1gb