It's probably Javascript garbage collection. We've worked hard to ensure the runtime doesn't create too many objects per tick, but occasionally it will do a full collect and that could make it skip a few frames. TBH for a garbage-collected language one "burp" every few minutes is a good result (badly done engines will be constantly choppy!), but I'm aware this is an issue. Hopefully Javascript engines will continue to improve and make collection faster and parallel (so it doesn't affect the framerate), and we'll keep GC optimising the engine to try and mitigate this.
I'd also be wary of:
- physics - avoid this *completely* if you want to avoid burps, because it creates huge amounts of garbage. It's difficult for us to fix because the physics engine itself does this.
- third party plugins, which may not be GC optimised
- creating and destroying large numbers of objects in events, since while C2 does recycle objects, this type of activity will probably flood the cache and end up creating garbage.
If someone could send me their project to test, I could investigate possible sources of garbage creation and perhaps make optimisations for the next build.