-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Performance regression since 4.2-beta1 when calling TranslationServer.set_locale()
every frame
#85718
Comments
Can you work on creating a minimal reproduction project? Without one we can't really do anything to help. The issue is likely some combination of your system, your add on, and your project. Without having access to those things, contributors can't even help you debug. If you can't create an MRP, then you should at least try to identify what is causing the slowdown using a profiler. You should be able to identify if the issue comes from Godot, from your scripts, or from the add on you are using. |
I just tried it without the addon. Nothing changes. |
I can't upload it here, because its too big 199MB, I stripped the game down, deleted all objects, most of the sprites/fonts and nothing changes. I also tried to open it on my Asus ROG Ally in Godot 4.2 but I get the same issue I hope its okay, when I send the Google Drive link. https://drive.google.com/file/d/187y1EATuBMvr7RcKAHX1k9FEcgF-uZLp/view?usp=sharing |
I ran the "test_room" scene in your project. It runs at 60 FPS on my device (11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz × 8 usingintel integrated graphics). Turning of Vsync and it runs at around 900 FPS. I am using 4.2 stable. Switching to the compatibility renderer I get about 1330 FPS. Have you been able to reproduce the issue on any other hardware? This issue might be specific to your hardware / drivers. When you run your project, does it say that it is running with your NVidia GPU? Or does it say it is using the CPU instead? I'm wondering if there is a switchable graphics issue going on here. Also, have you checked to make sure you are using up-to-date GPU drivers? |
I tried it on two separate devices. My Asus ROG Flow X13 and the Asus ROG Ally. I'm currently out of ideas why this happens :/ Thank you for looking into it :) Things I tried:
To your question, it is saying the GPU in the output when starting the game. It wasn't possible to reproduce it with new projects, but when I copy the game files to another windows 12 PC, I get the same issue |
System Details
Godot v4.2.dev6 - Windows 10.0.19045 - Vulkan (Forward+) - integrated AMD Radeon(TM) Vega 8 Graphics (Advanced Micro Devices, Inc.; 31.0.14057.5006) - AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx (8 Threads) |
What locale(s) are you using for your OS, and for Godot? |
You are a haero saierXP. I removed in a test version all of the translation stuff and it works without issues even in forward+. My OS is currently just German and my Godot is also in German currently. The translation of the game is changed in the options menu between german and english currently. First of, thank you guys for helping me with this! :D |
TranslationServer.set_locale()
every frame
I can't reproduce the performance issue on Linux, so this might be specific to Windows. CC @bruvzg I don't spot right away in the 4.2-beta1 changelog what could cause that performance regression. Maybe #80409 if changing the locale forces recalculating the title bar size. If so this might already be mitigated by #85542. |
Setting locale trigger reload of all remapped resources (which was broken before 4.2) and complete reprocessing of all text, this is definitely not a fast thing and should not be done every frame. |
Yeah I first thought about my fix to translation remapping #84791, but it was merged in 4.2-beta6, so the timeline doesn't check out with this perceived regression. I fully agree that resetting locale every frame should not be done, but it would be good to identify why it became much more expensive than it used to be. |
I can't reproduce the issue on macOS, but I guess we can add the check if locale is changed and only call updates if necessary. |
It is triggering title update, so might be related to #80409 I will check it on Windows tomorrow. |
It's very strange, I can't reproduce the previous test results and my computer hasn't been restarted. |
I will try it later, when I'm back home. As a question. You guys say, it is triggering the title update. Do you mean with title the game window title? |
I tried to replicate it on my ROG Ally (Win 11). i can replicate it, by just the steps mentioned before. |
As I mentioned yesterday, this might have been mitigated by #85542 already. Could you test latest |
It didn't fix it. The runtime doesn't go to the Edit: Execute set_locale in _process, frame rate is 54 fps, and small fluctuation change. 35 fps in _physics_process with large fluctuations. |
Godot version
4.2
System information
Windows 11
Issue description
I started a project in Godot 4 and updated Godot and ended up with Godot 4.2dev_6 because this was compatible with the modi_player addon and Glow at the same time. Other Versions either had framrate issues (like the main problem i have now) or the addon not working.
After Godot 4.2 stable came out, I tried to work in my game with this Version and get massive framerate issues (5fps) in the forward+ and mobile renderer, even in an empty scene. I tried turning off hdr / glow and changed other project settings, but nothing works.
When I change to the Compatibility render I get the maximum amount of frames possible.
I have a Asus Rog Flow X13, Ryzen 7, GTX 1650 with Max-Q Design and a AMD Radeon Graphics
Steps to reproduce
its only in this project, no else, but here are the stept I did with the Game.
Minimal reproduction project
I won't upload my game here, because I'm pretty far in developement.
The text was updated successfully, but these errors were encountered: