ikkuh Posted February 9, 2015 Share Posted February 9, 2015 Hi, I played around with Phaser and got periodic lag spikes in a very small test:http://jsfiddle.net/vxm6L8bm/The test consists of 1 state with 5 sprites moving from the right to the left on the screen. Upon leaving the screen on the left the sprite is reset back to the right. Testing this on a Desktop PC with Chrome version 40.0.2214.111 m and Firefox version 35.0.1 showed periodic lag spikes every ~19 seconds. Multiple frames seem to be skipped for no reason. You can literally watch it for 1 minute and see 3 lag spikes occur while being able to predict them each time. Adding debug text showing the FPS or using the debug plugin showed no problems at all. Does anyone know why these lag spikes occur? Link to comment Share on other sites More sharing options...
rich Posted February 9, 2015 Share Posted February 9, 2015 Profile it to be sure it's actual lag and not one of the many wonderful vsync issues plaguing browsers (Chrome especially) at the moment. Link to comment Share on other sites More sharing options...
Horizonicblue Posted February 9, 2015 Share Posted February 9, 2015 But anyways why this lag occurs?Even I found it in one of my game and was searching for some solution.I find it more noticeable in Chrome than in Internet Explorer. Link to comment Share on other sites More sharing options...
CtlAltDel Posted February 9, 2015 Share Posted February 9, 2015 It seems to be the garbage collector kicking in every 30 seconds or so. Some array leakage it seems. Link to comment Share on other sites More sharing options...
ikkuh Posted February 9, 2015 Author Share Posted February 9, 2015 Thanks for all the replies. CtlAltDel: If a memory leak is the problem. Does this mean phaser contains a memory leakage bug? Link to comment Share on other sites More sharing options...
rich Posted February 9, 2015 Share Posted February 9, 2015 Don't guess. Profile it and show the results. Dev Tools has many features for this. Link to comment Share on other sites More sharing options...
ikkuh Posted February 10, 2015 Author Share Posted February 10, 2015 Profiling didn't show any problem95-97% idle timeno memory leakgarbage collecting is not in sync with the lag spikes Link to comment Share on other sites More sharing options...
rich Posted February 14, 2015 Share Posted February 14, 2015 Then it's almost certainly a vsync issue. Chromium is especially bad at this atm (it's also out of your control I'm afraid) Link to comment Share on other sites More sharing options...
mwatt Posted February 21, 2015 Share Posted February 21, 2015 Rich is right ( shock! ). This is a lot of discussion on the web about this. Here is one good example link:http://www.vsynctester.com/manual.html#bugreports It even cites the current chrome version (40.0.2214.115) as one that has broken vysnc. For further proof, I fired up Firefox... and only very minimal jitter did I see. Link to comment Share on other sites More sharing options...
Recommended Posts