Jump to content

Phaser, too much idle time on each frame


Recommended Posts



In game, made on Phaser (2.1.3) is too much idle time on each frame. This causes FPS(frame per second) drop below 60.
Drawing takes minimum time, but the wait of the next frame lasts longer than necessary(have a look at white bars on the screenshot).

What causes this problem and how it could be solved?




Link to comment
Share on other sites

  • 3 months later...

That looks like quite a different trace, but it's not obvious to me that it's more helpful (atleast if you are still ultimately targeting WebGL for rendering). What about looking at something like Chrome's About Tracing tool? http://www.html5rocks.com/en/tutorials/games/abouttracing/

I've also got a hunch that Phaser's rAF callback could be improved by only drawing in the call, and using a setImmediate/postMessage call to call the update code only after yielding. I stress this is only a hunch (I haven't even tried to benchmark/prove it) but I imagine that returning from rAF calls sooner may help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...