Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug should be optional #984

Closed
sethillgard opened this issue Jul 8, 2014 · 4 comments
Closed

Debug should be optional #984

sethillgard opened this issue Jul 8, 2014 · 4 comments

Comments

@sethillgard
Copy link

debug.boot() here (https://github.com/photonstorm/phaser/blob/1c92caad421f10707c70ad66373b3a0b4cc7f56a/src/core/Game.js#L456) significantly reduces performance on low end devices (in my case I was getting 8fps vs 27fps with debugging disabled manually by commenting out the line above). There should be a way to disable debugging when dealing with devices where it matters.

@vforsh
Copy link
Contributor

vforsh commented Jul 9, 2014

When I saw this issue I was very excited but then I test this on iPhone 4 and unfortunately I didn't see any difference in fps (36 fps in both cases).
What device did you use for testing? Maybe this is device specific something.

@sethillgard
Copy link
Author

I experienced this on a Chromecast dongle. I assume this applies to similar devices. The problem seems to be that it creates a canvas element on top of the scene.

photonstorm added a commit that referenced this issue Jul 10, 2014
…sing the Game configuration setting: `enableDebug`. By default it is `true`, set to `false` to prevent the class from being created. Please note you are responsible for checking if this class exists before calling it, but you can do that via `if (game.debug) { ... }` (request #984)
@photonstorm
Copy link
Collaborator

There is now an optional flag to disable this - however I don't expect it will make any actual difference in this case.

@sethillgard
Copy link
Author

Thank you for fixing this. I can verify that it does make a difference. Unfortunately, since you are no longer creating a debug object, this line fails:

https://github.com/photonstorm/phaser/blob/8421cfc4004d90db1a3d49eb29ec4a186d05c4e0/src/core/Game.js#L646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants