-
Notifications
You must be signed in to change notification settings - Fork 344
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
[GameList][Performance] Redundant file accesses to Game Info when scrolling by 1 #753
Comments
Thanks for the detailed analysis. From a more general perspective it is expected to have at least two events But more than two are too much. Some educated guesses:
|
For the rising edge, I would imagine that the ideal case would be for to retain the information in the info panel (another option would be to clear it, but I would lean against this from a ux point of view because its so quick). For the held state, it clears the info panel which makes sense. Only for the falling edge, I would expect it to perform the 'expensive' operation of reading the file system for screenshots, marquees, and etc. Currently the
|
I have started experimenting on my branch https://github.com/XenuIsWatching/EmulationStation/tree/optimize_game_list |
I noticed significant stuttering on my system when scrolling on my game lists. I put the debugger on it, and found that it was spending most of it's time in
VideoGameListView::updateInfoPanel()
which makes sense as this is doing file access to the video, marquee, and images to be displayed... but what I found odd was that it was called 3 times for the same game (performing file accesses each time!) and when I only scrolled by 1 (which seems rather unnecessary). It was called once by the input for theup
ordown
button, then it was called twice again for by the stop scrolling.It calls from the
up
ordown
button from here:EmulationStation/es-app/src/components/TextListComponent.h
Line 283 in c6bbd38
Which then calls
listInput(delta)
then callsscroll()
, when then callsonCursorChanged()
which then calls theupdateInfoPanel()
later on.The stop scrolling is from here:
EmulationStation/es-app/src/components/TextListComponent.h
Line 313 in c6bbd38
This function is even more strange to me... It calls
listInput(0)
which will call theonCursorChanged()
function callingupdateInfoPanel()
, but then it performs a direct call toonCursorChanged()
right after finishinglistInput(0)
.VideoGameListView::updateInfoPanel()
EmulationStation/es-app/src/views/gamelist/VideoGameListView.cpp
Line 247 in c6bbd38
I tried to think to myself.. "How can I fix this?", but as I was reading through the lower portions of the code, but more I just began to see spaghetti 🍝 (or I just need to spend more time understanding it) and wasn't quite sure how to re-architect it in order to fix these redundant files calls without breaking anything else as I believe this code is used with more than just Game Lists.
Anyways, I'm raising this issue just so it gets visibility from those who may have insights
The text was updated successfully, but these errors were encountered: