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

I noticed the GPU went loco with PhaserEditor #127

Closed
j2l opened this issue Jul 2, 2019 · 16 comments
Closed

I noticed the GPU went loco with PhaserEditor #127

j2l opened this issue Jul 2, 2019 · 16 comments

Comments

@j2l
Copy link

j2l commented Jul 2, 2019

Version

  • Phaser Editor Version: 2.1.1
  • Operating system: Windows 10 Pro

Description

I'm evaluating your solution but have multiple questions:
First, I noticed the GPU went loco with PhaserEditor. Like if a bitcoin mining was running 😄
Do you know why?
image

Let's say it was not the smoothest experience.

@PhaserEditor2D
Copy link
Owner

Hi, thanks for reporting these bugs, I created separate issues:

#128

#129

@PhaserEditor2D PhaserEditor2D changed the title GPU, copyright, freemium popup I noticed the GPU went loco with PhaserEditor Jul 2, 2019
@PhaserEditor2D
Copy link
Owner

PhaserEditor2D commented Jul 2, 2019

Please, can you tell me the editors (I mean, scene editor, pack editor, js editor, ...) open when the GPU gets like that?

Does it happen always? With few images?

@j2l
Copy link
Author

j2l commented Jul 2, 2019

I just noticed the GPU fan started.
I wasn't doing anything special. Very few images (from Flying Dragon).

I exited and relaunched PhaserEditor and it worked normally (high CPU at first, and some GPU when dragging an image then 1% when idle).
I don't know what happened but it was stable in pumping resources, enough time to do a screenshot.

@PhaserEditor2D
Copy link
Owner

I should create some preferences to disable the screenshot builders, them could be the reason. The first time you create a project it creates the screenshots, the second time it reuses them. Please, can you try to create a completely new project again, with the Flying dino template and confirm the GPU gets a high usage percent?

@j2l
Copy link
Author

j2l commented Jul 2, 2019

OK, I took some time to pin the problem and made an (unpublished) video:
https://youtu.be/YetmsVP7MWo
Note that if I hadn't removed the watermelon animation, it would still use 80% GPU after minutes (and the GPU fan kicks in), so I suspect a glitch somewhere.

My GPU is GTX 970. so 80% is a lot of resources for a 2D platformer.

@PhaserEditor2D
Copy link
Owner

Thanks very much for the video! I am on it. Please send me hello to [email protected]

@PhaserEditor2D
Copy link
Owner

I think this is related to the embedded browser or how we are using Phaser in it. This will take some time. I keep you updated.

@PhaserEditor2D
Copy link
Owner

Hi, I received your email but the reply was rejected. You can PM in twitter https://twitter.com/PhaserEditor2D

@j2l
Copy link
Author

j2l commented Jul 2, 2019 via email

@PhaserEditor2D
Copy link
Owner

Please, can you try to reproduce the same behavior and then Refresh the browser? It looks like Phaser gets into a lot of requestAnimationFrame.
image

@j2l
Copy link
Author

j2l commented Jul 3, 2019

I was learning more about PhaserEditor when I see this ticket and noticed that GPU was low but CPU was high.
I hit refresh and CPU went down. So I guess, it's a fix for now.
Really hope it will be automatic :)

@j2l j2l closed this as completed Jul 3, 2019
@PhaserEditor2D
Copy link
Owner

Hi, thanks for testing it.

I will reopen the issue because yet I don't realize what is going with Phaser and the browsers.

@PhaserEditor2D PhaserEditor2D reopened this Jul 3, 2019
@PhaserEditor2D
Copy link
Owner

I think I found the problem. The common is that Phaser runs a paint loop with a high FPS. We, in Phaser Editor, stop that loop and request a paint just when needed. For I reason I should find now, when you drop an object, the loop may start again and a lot of painting are requested and never stop.
I should release a new version as soon as I fix the problem.

@PhaserEditor2D
Copy link
Owner

Some progress on this.

The problem is that when you add a new texture, the editor has to start the Phaser loader to load it. For some reason, it starts the game loop, and we do not stop it at time. Please, uncompress the zip I attach here and paste its content into the folder:

PhaserEditor2D/plugins/phasereditor.scene.ui.editor.html_2.1.1.20190623/html/out

Accept to replace the files.

You should look a white label in the left corner of the Scene Editor. That label displays the number of painting calls. Please, try to reproduce the error and see that number does not go crazy and go up forever, even if the editor is idle.

If it works for you, I should release a new version of the editor this week, with the fix.

Thanks

image

@j2l
Copy link
Author

j2l commented Jul 4, 2019

OK, the initial drag problem seems fixed but now, when I start and do nothing, it seems to hold the CPU in hostage until I refresh the internal browser.

It's a slightly different problem since it's the CPU and the painting calls remain under 21 on idle.

I write another ticket for issue with selection behavior

@PhaserEditor2D
Copy link
Owner

when I start and do nothing, it seems to hold the CPU in hostage until I refresh the internal browser.

I will try to reproduce that behavior.

the painting calls remain under 21 on idle.

That's the correct behavior. The painting calls should increment only when you do modifications in the scene and it needs to be repainted.

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

2 participants