Closed ronag closed 7 years ago
Can you see which process is leaking? There probably is another way, yes. Just not a way I am aware of.
Is this 2.1 Robert?
Running your example on 2.0.7 has a leak (looks like the CEF process). Also in latest Chrome Dev, same leak.
However I'm running constantly updating tickers using requestAnimationFrame on 2.0.7 without any differences in memory usage, it's +-1MB through the day (total usage is always about 39-40MB) - and these tickers run for weeks!
Also your template runs at 2% CPU here, while my ticker is at zero (doing a whole lot more stuff per frame).
It's on 2.0.7.
I solved this by completely removing the custom requestAnimation thing that CasparCG does. As far as I see it makes no difference since CEF will run on it's own clock anyway. There is a bug though where the framerate is set to 25 fps instead of 50 fps in e.g. 1080i5000 which causes animation to be unsmooth.
Without the custom requestAnimation thing I have never gotten smooth animations with the html producer, not even in 5994 modes. Under what circumstances are you able to get smooth playback without it?
requestAnimationFrame leaks in Caspar a few kb every minute.
Example:
I'm looking into it but haven't had time to quite figure it out. I think the general solution for requestAnimationFrame in CasparCG is a bit hacky. There has to be a better way. We should probably ask the CEF guys.