danielstern/ngAudio

Digest trigger all over again

Closed this issue · 3 comments

Augus commented

Digest trigger all over again when checkWatchs, that do not make sense�.
var interval = $interval(checkWatchers, ngAudioGlobals.performance);

To fix this problem, plaease add params to $interval
var interval = $interval(checkWatchers, ngAudioGlobals.performance, 0, false);

Please reopen, we also faced this issue on a web project, leading to HUGE performance impacts for our customers and effectively rendering our software unusable. While there is actual work for the client to do, we are around 15-20 digest cycles per second. With this bug, while being idle the digest cycles skyrocketed up to 120! cycles per second, when using ngAudio.load

PR please

Hey there, it was already posted by my colleague above. mindsmash@0c512a0

However there is still a memory leak for IE11 due to the internal implementation of setInterval. Could've fixed it by changing this to use setTimeout instead, but that was too much effort in our case. We ended up not using this library any more.