Optimization of Fullscreen Menu Navigation Performance#657
Merged
frysee merged 3 commits intoLoveRetro:mainfrom Feb 17, 2026
Merged
Optimization of Fullscreen Menu Navigation Performance#657frysee merged 3 commits intoLoveRetro:mainfrom
frysee merged 3 commits intoLoveRetro:mainfrom
Conversation
d1c94af to
7def988
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
Significant navigation stutter occurred during menu navigation when folder names were hidden. I have been trying to figure out the reason for such a long time, and my long-term hypothesis was that it was due to large image sizes. However, not only did using small image sizes not fix the issue, but using the exact images and enabling menu folder names actually and oddly, fixed the stutter. Yet the reason still eluded me. Recently, I noticed that there was a pattern where it only stuttered in 40% of the images, and always for those specific images (which had nothing to do with images at all).
Cause:
In the menu's idle loop, there is a check for is_scrolling. If an entry name is long enough to scroll (even if it's currently hidden), the code enters a high-priority block meant to update the scrolling text (my use case is that I always use transparent icons to shorten long console names to leave enough space for the background image).
When text is ON: The code enters this block, calculates the scroll position, renders the text to the screen, and eventually triggers a screen refresh (flip). This refresh is synchronized with the hardware's frame rate, which keeps the CPU usage stable.
When text is OFF: The code still enters that same high-priority scrolling block because the entry name itself is still "long." However, because names are hidden, it skips the rendering part. Crucially, it also skips the PLAT_GPU_Flip() call that normally regulates the loop's speed.
By gating is_scrolling with list_show_entry_names at the source, we prevent the system from ever entering that high-priority update loop when text is hidden. This allows the CPU to remain idle between inputs, ensuring the navigation remains responsive. Also, by renaming the other variable to
should_animate, we try to avoid messing up the navigation animation by introducing conflicts.