-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Mainmenu performance regression #14655
Comments
The content translations are cached in memory so this shouldn't be happening. Maybe see if something is erroneously causing the cache to be lost |
I also noticed this recently (but didn't know it's a regression). |
The caching is this specifically: https://github.com/minetest/minetest/blob/master/builtin/mainmenu/content/pkgmgr.lua#L792-L803 I'm guessing that something is causing the content to be reloaded unnecessarily |
I don't think there really is any caching? The linked code always translates the title / description. For that it calls an engine function which ends up calling The way that code is currently designed methods like |
The intended caching is that it stores the translated text in the content tables rather than fetching it every time it needs to translate. Something is clearing the content tables unnecessarily |
Ok, I think it's the update detector that's refreshing the content tables: https://github.com/minetest/minetest/blob/master/builtin/mainmenu/content/update_detector.lua#L130-L131 |
Minetest version
6303334
The first affected commit is b4be483.
Irrlicht device
SDL
Operating system and version
Fedora Linux 39 (Workstation Edition)
CPU model
Intel® Core™ i7-4790K × 8
GPU model
NVIDIA GeForce GTX 1080 Ti
Active renderer
OpenGL 4.6.0
Summary
While comparing 5.8.0 and 5.9.0-dev, I noticed that the 5.9.0-dev mainmenu reacts noticeably slower to button clicks etc. than the 5.8.0 one in some situations. This is especially visible when looking at the clouds in the background, which make a small jump each time I click a button.
I have bisected this problem to b4be483 / #12208 @rubenwardy
The problem is especially easy to see when going through the pages of the ContentDB dialog. In the following video, 57de599 (good) is on the left and b4be483 (bad) is on the right. For comparability, I used an autoclicker to click with 2 CPS in both videos.
bad.jumping.mp4
Steps to reproduce
In the mainmenu, compare the delay between clicking a button and the result being shown between 5.8.0 and 5.9.0-dev. See that it is longer on 5.9.0-dev and that Minetest may even hang in some cases.
I'm not sure which views are affected by this, but at least the "Content" tab and the ContentDB dialog are definitely affected.
The text was updated successfully, but these errors were encountered: