-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Poor 2D editor performance on macOS 10.13.x and newer with Intel Graphics #17584
Comments
On an HD 3000 as you had mentioned in the title initially I would not be surprised (it barely supports OpenGL 3.3, if at all on macOS), but on an HD 6000 it's indeed surprisingly bad. |
Yeah, the "3000" was a typo. |
Can't confirm this issue on my MacBook Air with MacOS Sierra 10.12.6. So this could eventually be a problem specific to MacOS High Sierra? OS/device including version: |
Addendum to my initial bug report: When I continually decrease the size of the editor window, there is a noticeable improvement in responsiveness/render speed, moving from the perceived 15 FPS when running in fullscreen all the way to perceived 60 FPS once the window is really, really small. What kind of performance should I be expecting? I have been (naively; I know nothing about Godot's internals) assuming the IDE would make full use of the graphics chip's rendering capabilities (like it appears to do on Windows). Is this correct? Either way, if there is any additional information I can provide, please let me know. Sadly I don't have access to other MacBook Airs or same or similar configuration that still run Non-High Sierra to test @Foxcataria's hypothesis. |
@aranha92, would you describe your IDE's performance as "perceived 60 FPS"? The best I can get -- only after reducing the window size to less than fullscreen, though -- is something that feels like 30. My biggest problem right now is that I have no idea what kind of performance I should be expecting. |
@hmans, if we imagine some kind of scale where we have 60 FPS for the smoothest reaction of the editor down to 0 FPS where no reaction is present than you normally should expect the full 60 FPS. This should normally be independent of the editor size. So whether it is fullscreen or not, you always should have best performance. The solution to this issue is really hard to find...did you compile the engine yourself or do you just use the stable release you can download in form of a binary (that's the way I did)? And does this behaviour always occur across every project or is just this specific project? |
Thanks @Foxcataria, it helps me to know that I actually am dealing with unexpected behavior, and not just being ignorant. :b
I'm using the stock binary available from the website.
I will try some more projects, but I don't remember the editor ever being any kind of smooth on my system.
Overall, things appear to be working fine on this system -- do note that Godot actually plays the game just fine (with the expected 60 FPS, it's a really simple project.) So I doubt this is a general issue of my system. If there is anything else I can do to help, or anything I could look into, please let me know. |
Hm...that's really strange... |
I will try to get my hands on a 2017 MacBook Air that has a fresh High Sierra install (or maybe wipe mine if I find the time to set up everything fresh...) and try again then. Other than that, I don't know what to try next, beyond waiting for that new Vulcan-based renderer that was mentioned on the blog. It's all a bit frustrating :/ |
PS. - if you want to close this issue for the time being, please go ahead and do so. I'm happy to reopen it (or create a new one) if I find any leads. I'm not closing it myself since I don't know what your regular process regarding issues like this is. |
Quick question to subscribers to this issue (thanks for sticking around): is there a way to get a FPS debug counter for the Godot IDE (not the running game -- just the IDE)? |
Run Godot in verbose mode: |
Thanks @akien-mga! Unfortunately, the logging appears to stop once I open a project. When opening the project directly via
Getting some editor FPS info would be a great help for trying to further isolate this issue. |
I'm also interested in the way we can get for example FPS information about the editor, because all this information could help to solve problems on an individual specific system when almost nobody can reproduce the issues. @hmans at the moment I get the same type of output as you showed here. So it seems to be the expected output, but I'm not sure. |
It used to be possible but it looks like we removed the feature/bug in #16005. |
I've readded an option for it in #17666. |
Thanks! I'll give it a spin as soon as possible. |
A quick update: I've compiled today's master (with #17666 merged in) to do some testing. While the editor is idle, it's reporting around 105 FPS. When I interact with my project's Test.tscn -- eg. by dragging around the viewport in the editor -- the FPS drops dramatically, depending on the editor size:
While I'm still not sure what kind of performance I should be expecting, I'm definitely not seeing what @Foxcataria suggested in this comment. I've tried the whole thing with some other projects as well, with the same results. (I know this probably doesn't bring us close to an answer, but I still wanted to give an update. Thanks @akien-mga for adding |
Allow me to bump this issue with a quick update: I'm observing exactly the same issue with the new Blender 2.8 as opposed the currently stable Blender 2.7. I know this isn't terribly scientific, but considering Blender 2.8 touts OpenGL 3.3 support... maybe this could be a hint? (A quick tour of Google didn't reveal any indicators about any sort of incompatibility between OpenGL 3.3 and the Macbook Air model I have, though.) I know this isn't terribly scientific... I'm posting it on the slim chance that this will maybe connect some dots somewhere and help narrow it down. |
I develop on both Windows and Mac and one oddity I have noticed about Macs is that sometimes you will see multiple "Godot" processes lurking in the background, taking up just as much processing power as your editor. In my case, every time I Play the game from the editor and it launches a window, there's a zombie Godot process lurking around 30-50% CPU usage that wont go away--not even when I close the editor--unless I do When your editor starts to slow down, open a Terminal window and type in |
Does this problem occur with 3.0.6 and/or 3.1-beta? Does using the GLES 2 renderer help? |
Not sure but may this issue relate to this one? I'm having this issue in the mentioned link, my IDE feels low fps as well and only updates the screen by clicking and resizing the window. (I'm on Intel HD 620). If this is not related to this issue, I can create a new issue for that, since i could not find it here. |
@IgnasKavaliauskas This should be resolved by updating your driver to the latest version provided by Intel, see #23069 (comment). That said, that issue doesn't seem to be related to the one reported by OP here. |
As stated on Twitter, GLES3 vs. 2 doesn't make a difference here. (Is switching the editor project between these setups using the top-right dropdown enough, or would I need to do something else?) |
Just switching the top-right dropdown should do it. By the way, anyone who can build from source can test out the PR above that we are hoping will fix this (the PR is mostly complete). |
I'll give it a whirl. |
I've tried the PR and given feedback in the PR itself. For anyone else following this issue here, here's a little video I made to document the choppiness: |
Well now it seems reducing GL_LINES didn't help we are somewhat back to square one. Still assuming it is rendering that is the problem, some ideas:
I've also suspected something to do with the sleeping and power saving in the editor on Macs, but that doesn't tie in with switching off the ruler speeding it up. It would be nice to get it profiled too. That would show us if anything unexpected is appearing in CPU, and if it is drawcalls the driver typically shows up for a large percentage of time. |
Me again, eep! I just tried the web-based version of the editor (from this URL) on my Mac, and it's running beautifully (specifically, it doesn't exhibit the performance regression that this issue is about.) Browser: Microsoft Edge 83. Maybe this can help you pin things down further. |
I read something else yesterday (sorry, lost the link) which made me think again that we could be doing something causing it to fall back to a software rasterizer (despite the GL_LINES tests). Perhaps the WebGL implementation is avoiding this. The number of drawcalls is the same on the web version, so that suggests number of drawcalls is unlikely to be the problem, unless there's some huge difference in that respect (usually drawcalls are more expensive on web, not less!). That's assuming it is the rendering. In the Native IDE (Not the browser)sorry my fault for the confusion 😀
The rendering guys here would use a similar process of detective work to find if a particular feature was causing the slowdown (if we had the test device). After all the editor is just a Godot project, so it is likely that something being added will dramatically slow the frame rate. That news though is very encouraging it sounds like a simple change will be all that is needed to fix it. 👍 |
I'm going to put the web version of the editor under some pressure to see if I can reproduce the issue there. |
Me and @clayjohn discussed this yesterday, we weren't sure on what method Edge browser is using for WebGL on mac, whether it is translating WebGL to Metal or going to GLES2 etc. If it is going straight to Metal it might be avoiding driver issues in GLES2. Although WebGL is based on the GLES2 API, it often gets translated to another API (e.g. ANGLE on windows going to directx) rather than mapping 1:1 to GLES2 commands. So you may not find much by playing with the browser version (although worth a try). Far more relevant is to try running different projects from the native IDE with different UI items, lines (of different thickness), polygons, frame buffer, effects etc, to try and work if one particular aspect is causing a dramatic slowdown (putting it into software rasterizer mode). |
As a first test, I just kept adding 2D sprites to a scene to see how it would affect the editor's performance, and it did eventually drop down to 30 and later 15 frames per second (I didn't measure these scientifically -- is there a way to have the editor print FPS?) Then I deleted the sprites again, and the whole thing went back to peak performance. As a side note, this was still significantly better than the native Mac version, where even just opening an empty project would give me 8-15 FPS with the grid enabled. Looking at the simplicity of the scene in the screenshot, I would naively assume that the editor would remain at 60 FPS, but I'm still not sure if I'm simply expecting the wrong thing. (I'm basing this expectation on the simple and very unscientific observation that I'm not seeing any of these performance issues in similar game making tools running on the same machine. I know, it's never that simple... :b) |
I've now done the same test in Chrome 83 (Mac), and interestingly, the editor remained (mostly) smooth as butter, even with a much higher number of sprites added. Huh. |
I couldn't test with Firefox since the editor wouldn't even start there, unfortunately (Firefox 76.0.1, Mac). |
Just a quick update that this issue is still around in 3.2.2 Beta 4. (None of the changes made me expect any different, I just wanted to test it anyway.) MBP 13" 2018 |
Hey everyone, a quick update on this issue: I dug out an oooolllld Macbook Air from 2011 and started Godot on it, and lo and behold, it did not have the issue; the 2D editor -- with grid enabled -- was just as responsive as the 3D editor (even though overall performance wasn't great. I didn't use Specs of that old machine: Now, I don't know if this is because of the different graphics unit (Intel HD Graphics 3000), or because that Mac was still running High Sierra, but the latter sounds a lot more likely. |
We may have this cracked. Anyone else who can test my build in #39758 would be welcome. 👍 |
@lawnjelly I am (extremely!) happy to report that this appears to have solved the issue, yes. 🎉 I created a new GLES3 project, and once the orphan_method setting was set to "Fresh Buffer" (and restarting), everything was buttery smooth. Is this also coming to the GLES2 renderer? Good work & thank you! |
Great! 👍 I'm just finishing up the PR now, I have it working for all the 2d stuff, I'm just checking whether the same modification might be beneficial anywhere else (3d, immediate geometry etc). It will be for GLES2 as well. |
Fixed by #42734. |
Godot version:
3.0.2 for macOS (without C#)
OS/device including version:
MacBook Air 2017, 1,8 GHz i5, 8 GB RAM, Intel HD Graphics 6000
Issue description:
The Godot editor is running quite slowly, best described as "stuck in 15 FPS" (very unscientific, I agree, but that is what it feels like.) This is while working on a very simple 2D game (which I have included for reference.)
The game itself runs smoothly, it's just the editor that is sluggish. It doesn't matter if I'm moving around in the 2D editor or editing code, everything is just relatively unresponsive.
The log output states
OpenGL ES 3.0 Renderer: Intel(R) HD Graphics 6000
, but the whole thing feels like it's falling back to some sort of fully software-based rendering mode.(I should add that I'm fully aware that a HD 6000 is no GeForce GTX, but it's not entirely useless, and Godot is running the game on it just fine.)
Steps to reproduce:
Start Godot on a Mac similar to the one described above and edit the attached game (or probably any other game.)
Minimal reproduction project:
SpaceRage2-master.zip
The text was updated successfully, but these errors were encountered: