-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
There is an issue in Chrome, where many audio tags crash the Chrome renderer process (https://code.google.com/p/chromium/issues/detail?id=156331 , it is marked as fixed, but the crashes still happens, see my comment there).
To reproduce the crash in a somewhat realistic use case:
setInterval(function() {
new Howl({ urls: ["http://assets.sauspiel.de/sounds/effects/applaus-61-90Punkte-1.mp3"], buffer:true }).volume(1).play()
}, 1000);
In Mac OS X's Activity Monitor you can follow the Thread count of the Chrome renderer process going up and never down. At about 400 threads the renderer crashes (without leaving crash reports, of course) after playing about 200 sounds.
In contrast if one uses HTML5 Audio without Howler, e.g.
setInterval(function() {
var audio = new Audio("http://assets.sauspiel.de/sounds/effects/applaus-61-90Punkte-1.mp3");
audio.play();
}, 1000);
The process' thread count still goes up continually, but get's down again when a garbage collect is triggered (as can be seen in the Web Inspector Timeline), making a crash less likely at least.