Skip to content

Load content runtime data 'on demand'#8717

Merged
hizzlekizzle merged 2 commits intolibretro:masterfrom
jdgleaver:runtime-on-demand
May 9, 2019
Merged

Load content runtime data 'on demand'#8717
hizzlekizzle merged 2 commits intolibretro:masterfrom
jdgleaver:runtime-on-demand

Conversation

@jdgleaver
Copy link
Copy Markdown
Contributor

Description

At present, when playtime logging is enabled, the runtime information associated with each entry of a playlist is loaded when the playlist itself is opened. On the vast majority of platforms (and all desktop systems) the performance impact of this is negligible - but on devices with very slow storage (typically Nintendo consoles), once a playlist accumulates ~100 runtime logs then the added delay when opening the playlist becomes noticeable (and annoying).

With this PR, runtime logs are only read when the menu driver presents the associated entries (the values are cached, and only reloaded once the playlist is opened anew). This places an upper limit on the number of runtime logs that can be loaded at any one time:

  • For RGUI, this is 17

  • For XMB, this is ~11

  • For Ozone, this is 1 (Ozone doesn't use playlist sublabels, so it can handle this more efficiently)

  • GLUI unfortunately loops through all entries regardless of what is shown, so no benefit is seen here...

Basically, this means that playlists can be arbitrarily long, and have an arbitrary number of runtime logs, and performance will not suffer on weak devices (unless they use GLUI, but this is not available on console platforms anyway).

Note that further improvements are possible with changes to the menu entry code - I'll look into this later.

@ghost
Copy link
Copy Markdown

ghost commented May 7, 2019

This pull request introduces 1 alert when merging a4785b7 into ba3f164 - view on LGTM.com

new alerts:

  • 1 for Declaration hides parameter

Comment posted by LGTM.com

@jdgleaver
Copy link
Copy Markdown
Contributor Author

Okay, just pushed a commit to get rid of that LGTM warning...

@hizzlekizzle hizzlekizzle merged commit 10ef7dd into libretro:master May 9, 2019
@jdgleaver jdgleaver deleted the runtime-on-demand branch May 9, 2019 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants