-
Notifications
You must be signed in to change notification settings - Fork 491
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
PhaserCE 2.7.X has performance issues compared to Phaser 2.6.2 #198
Comments
Hi! Maybe it would worth the effort to try the versions between 2.6.2 and 2.7.3 - I think it would help to find out which commit(s) are resulted in performance regression. |
https://github.com/vpmedia/PhaserPerfTest/tree/master/phaser-perf-test |
I did a quick test on my iPad2 with version 2.7.0 using 100 text objects. Similar to my other 2.7.x tests it also runs with approx. 6 fps. Furthermore I've tested this with version 2.5.0 which behaves similsar to 2.6.2 by running with approx. 56 fps. So this issue starts with version 2.7.0 and concerns the whole 2.7.x version family. @vpmedia Thanks for extending my test project. Can you please create a pull request for your changes such that I can integrate them into my repository? Thanks. |
I've created a pull request: |
Text is really a special case, though. |
I think the source of the issue is somewhere in PIXI.WebGLSpriteBatch class ..
Phaser 2.7.7 triggers two separated flush calls and batch size equals with one:
|
Some additional comments: https://github.com/photonstorm/phaser-ce/blob/master/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js#L249 |
Also If I completely comment out https://github.com/photonstorm/phaser-ce/blob/master/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js#L249 condition fps stays at 60, I can see the text objects but there are also upscaled blurred huge texts in the background. |
I've played a little bit more with the debug settings, my conclusion is that the text draws are not batched since Phaser 2.7.X |
@photonstorm Sorry for bothering, could you help out with this performance issue? |
I've made some draw call debugs: |
Hi, also as an extra side note this issue is not text specific. Question is that this was a tradeoff when multi-texture or other feature has been added or an unnoticed performance regression? I must support a wide range of devices so this one is really important to me. |
@bitnenfer any thoughts on the above? |
@RazorDE I had to revert back to 2.6.2 because of this ticket, I thought I share some updates from the 2.7.X-CE branch which I think should be included in the last official version: |
@vpmedia Sorry to hear that you had to switch back to 2.6.2 and thanks for providing the links in your comment. I have the feeling that this issue is not so trivial to fix and I guess the only way around it when using 2.7.x right now is using Bitmap-Fonts instead which isn't really multilingual friendly. |
@RazorDE You cannot mitigate the issue using bitmap fonts because this is not a text issue, the whole render engine affected. Phaser 2.6.2: Phaser 2.7.10 As you can see with this minimal example which is using two png sprites and no text: 2 draw with 16 calls vs. 3 draw with 28 calls. In my opinion it would make more sense for the community edition project to revert to the original 2.6.2 codebase and apply patches into that. ... Or fix this because this is a show stopper. Anyway personally it's fine for me to wait for the new 3.X release and use 2.6.2 meanwhile. |
I've been hit by this bug too - on a related note, |
@samme can you add please a 2nd separated image? - my test included a green preloader bar too |
Now they have equal draw counts (6) but v2.8.0 has 8 calls per draw (including 2 to |
https://themoonrat.github.io/webgl-benchmark/?library=Phaser2&version=2.6.2&scene=1&objectCount=10000 |
When I've tried to update my game project from Phaser 2.6.2 to PhaserCE 2.7.7 I've noticed that the latter seems to have some serious performance issues which can be especially noted when testing it on some older mobile phones or tablets.
When using PhaserCE these devices can handle way less text objects without dropping frames than they are able to do with version 2.6.2.
I think it is best to demonstrate this with an example. That's why I've uploaded a test to Github that measures the framerate: https://github.com/RazorDE/PhaserPerfTest
Please also checkout the readme-file of the project for further instructions and for the results from my tests.
Hope this helps you finding the issue.
Please let me know if you need more information from me.
The text was updated successfully, but these errors were encountered: