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

Godot editor using ~70% cpu. (macOS) Latest build as of 10-23-2017 #12366

Closed
ismyhc opened this issue Oct 24, 2017 · 40 comments
Closed

Godot editor using ~70% cpu. (macOS) Latest build as of 10-23-2017 #12366

ismyhc opened this issue Oct 24, 2017 · 40 comments

Comments

@ismyhc
Copy link

ismyhc commented Oct 24, 2017

macOS Sierra
10.12.6 (16G29)
MacBook Pro (Retina, 13-inch, Late 2013)
2.4 GHz Intel Core i5
8 GB 1600 MHz DDR3
Intel Iris 1536 MB

I've compiled for OSX as the docs list.

user@host:~/godot$ scons platform=osx
user@host:~/godot$ cp -r misc/dist/osx_tools.app ./Godot.app
user@host:~/godot$ mkdir -p Godot.app/Contents/MacOS
user@host:~/godot$ cp bin/godot.osx.opt.tools.64 Godot.app/Contents/MacOS/Godot
user@host:~/godot$ chmod +x Godot.app/Contents/MacOS/Godot

Editor uses around 70% cpu.

zuexeuz.zip

@mhilbrunner
Copy link
Member

mhilbrunner commented Oct 24, 2017

I can confirm that at least on Windows x64, the current master@4396712 idles at 0-1% with a project open in the editor. Seems to be Mac OS X specific?

@marcelofg55
Copy link
Contributor

marcelofg55 commented Oct 24, 2017

I tested it with OS X Yosemite and for me it idles at 1-2%.
Edit: Tested with the attached project.

@Zylann
Copy link
Contributor

Zylann commented Oct 24, 2017

@ismyhc is there any message in the system console?

@ismyhc
Copy link
Author

ismyhc commented Oct 24, 2017

@Zylann no messages in the console. I think its related to the project I attached. I Just opened a new project and the editor hovers around 6-8 %. Could you try loading the project I attached? Its very possible I may have changed some setting that may be causing the issue. Im going to recreate the project from scratch. Its very small.

@bruvzg
Copy link
Member

bruvzg commented Oct 24, 2017

macOS 10.13 (17A405): 2-3% idle with attached project opened.

@ismyhc
Copy link
Author

ismyhc commented Oct 24, 2017

@bruvzg Unfortunately Im not in a position to upgrade to High Sierra quite yet. :( Im trying to figure out what it is about the project that is causing the issue.

@eon-s
Copy link
Contributor

eon-s commented Oct 25, 2017

This is for master, right? there are other reports of apparently the same issue on 2.1 #8766

@ismyhc
Copy link
Author

ismyhc commented Oct 25, 2017

@eon-s yes, this is for master as of 2 days ago. Im going to try and do more testing today.

@ismyhc
Copy link
Author

ismyhc commented Oct 25, 2017

Is this output correct?

OpenGL ES 3.0 Renderer: Intel Iris OpenGL Engine
GLES3: max ubo light: 409
GLES3: max ubo reflections: 455, ubo size: 144
ARVR: Registered interface: Native mobile

Should my mac laptop be using OpenGL ES 3.0? I wouldn't expect be using OpenGL ES.

@mhilbrunner
Copy link
Member

I think Godot 3.0 always uses OpenGL ES 3.0, yes.

@bruvzg
Copy link
Member

bruvzg commented Oct 25, 2017

@ismyhc It is correct, same renderer use OpenGL 3.0+ on desktop platforms and GL ES 3.0 on mobile/web.

@ismyhc
Copy link
Author

ismyhc commented Oct 25, 2017

@mhilbrunner @bruvzg ah, okay. Well I just started a brand new project. One main scene with nothing in it, one scene which is just a node with script attached that draws rect and boom, back up to ~70% cpu. Deleted all the scenes, and still stays at ~70%. Im baffled as to what is causing this.

@bruvzg
Copy link
Member

bruvzg commented Oct 25, 2017

@ismyhc Try using profiler: Xcode > Open Developer Tool > Instruments > Time Profiler, maybe it will give some additional information.

@ismyhc
Copy link
Author

ismyhc commented Oct 25, 2017

@bruvzg Okay, I did upgrade to High Sierra, but still same issue. I opened up Time Profiler and heres a screenshot.

This seems like the start of it: RasterizerCanvasGLES3::_canvas_item_render_commands(RasterizerCanvas::Item*, RasterizerCanvas::Item*, bool&)

screen shot 2017-10-25 at 4 31 23 pm

@ismyhc
Copy link
Author

ismyhc commented Oct 26, 2017

Just an FYI. Alpha 1 doesn't have this problem. Im going to start backtracking master to see if I can determine when the problem starts.

@akien-mga
Copy link
Member

Before attempting a bisect, make sure to build alpha 1 (f55211a) locally to confirm that it's not affected by this issue, as it's possible that official binaries work fine but that you self-compiled ones are problematic.

@bruvzg
Copy link
Member

bruvzg commented Oct 26, 2017

This seems like the start of it:
RasterizerCanvasGLES3::_canvas_item_render_commands

Maybe v-sync is not working (it is enabled by default). Related to #12355?

@reduz
Copy link
Member

reduz commented Oct 26, 2017 via email

@ismyhc
Copy link
Author

ismyhc commented Oct 26, 2017

@reduz yes, spinning wheel is always spinning. Im building alpha-1 as @akien-mga suggested right now to see if the issue is happening from my local build.

@ismyhc
Copy link
Author

ismyhc commented Oct 26, 2017

  1. I can confirm building alpha 1 (f55211a) locally works as expected. No cpu issues.
  2. As of Sep 27, and commit 4f39ce3 the cpu issues DO exist.

@ismyhc
Copy link
Author

ismyhc commented Oct 26, 2017

So I just noticed something. When clicking the spinner, the option "Update Always" is checked. If i set this to "Update Changes", the cpu usage hovers around 8% - 12%. Im not sure if this is the fix, but it does help.

@reduz
Copy link
Member

reduz commented Oct 26, 2017 via email

@ismyhc
Copy link
Author

ismyhc commented Oct 26, 2017

@reduz im satisfied with that answer :)

@reduz
Copy link
Member

reduz commented Oct 26, 2017 via email

@ismyhc
Copy link
Author

ismyhc commented Oct 26, 2017

@reduz I think what happened was that I not knowing what it meant, clicked on it and it popped up a alert that said it was a deprecated setting. I must have assumed since the alert popped up that the change didn't occur so I never thought twice about it, but in fact it was changed to (update always).

Anyways, mostly just confusion on my part. Feel free to close this ticket. :)

@akien-mga
Copy link
Member

Well no, the 70% CPU usage is not a feature :) What @reduz was referring to is the Update Always / Update Changes and its impact on CPU usage, which is expected. But 8%-12% CPU usage in Update Changes and 70% in Update Always is a bug.

@eon-s
Copy link
Contributor

eon-s commented Oct 27, 2017

Wait, the popup that talks about the deprecated function actually turns on the deprecated function?

Why not disable it at all if should not be used anymore?

@akien-mga
Copy link
Member

Why not disable it at all if should not be used anymore?

Because it's still needed in some cases due to bugs, so we need to be able to enable it to debug and fix bugs.

@Zylann
Copy link
Contributor

Zylann commented Oct 27, 2017

@eon-s And this #11030

@eon-s
Copy link
Contributor

eon-s commented Oct 27, 2017

@akien-mga ah, ok, but the popup message is kind of confusing, like meaning the option is not working, maybe a "deprecated" or "for testing only" text on the menu may be better.

@volzhs
Copy link
Contributor

volzhs commented Nov 20, 2017

Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
GeForce GTX 670
Ubuntu 16.04
master 4d5b828

now spinner keeps rotating and editor uses 50% cpu usage on my machine on idle in Update changes setting. 😕

@bruvzg
Copy link
Member

bruvzg commented Nov 20, 2017

now spinner keeps rotating and editor uses 50% cpu usage

Same on macOS.

@volzhs
Copy link
Contributor

volzhs commented Nov 21, 2017

with c846e49
editor uses 4~5% CPU now.

@reduz
Copy link
Member

reduz commented Nov 25, 2017 via email

@reduz
Copy link
Member

reduz commented Nov 26, 2017 via email

@reduz
Copy link
Member

reduz commented Nov 26, 2017 via email

@reduz
Copy link
Member

reduz commented Nov 26, 2017 via email

@akien-mga
Copy link
Member

Closing as there were no updates since reduz's questions a year ago.

@L3V147H4N
Copy link

L3V147H4N commented Dec 26, 2020

I'm testing Godot 3.2.3.stable.official on Mac Book Pro with macOS Catalina 10.15.7 and on some projects the Spinner wheel spins all the time in all in all scenes/viewports even on Script editor. (it is set to Update when Changed)
I started a new project and now it works correctly so it seems the issue gets stuck per-project. I'm not sure what to check on the project that doesn't work properly to figure out what it might be.
@reduz

(it gets the CPU/GPU so hot that restarts the Mac)

Specs
MacBook Pro (Retina, 13-inch, Early 2015)
CPU 2,9 GHz Dual-Core Intel Core i5
MEM 8 GB 1867 MHz DDR3
GPU Intel Iris Graphics 6100 1536 MB

@Calinou
Copy link
Member

Calinou commented Dec 26, 2020

@L3V147H4N This is already being tracked in #39758. See this page for a workaround.

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

No branches or pull requests