Skip to content

Media Provider: Un-mark as internal so it can be optionally disabled #1090

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

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

nicjansma
Copy link
Contributor

Alongside some Android startup improvements in #1089, I found that the Media processing was taking a long time during Pegasus startup.

For example, on an Anbernic RG405M device with 40k+ screenshots, it's taking over 32s:

2023-11-08T15:49:55 [i] Media: Finished searching in 32105ms

Guided by a comment in #839 (comment), I tried disabling the Media provider, and it cut out this delay entirely.

After I did this, I reviewed my theme and could not find any side-effects -- all screenshots were continuing to load OK. I reviewed its code, and could not find other obvious places its output would be used, so I must be missing something. Is there something the MediaProvider is doing that I'm breaking by disabling it?

Anyways, for my use-case, it seems like avoiding the MediaProvider is beneficial (faster startup) and causes no side-effects.

This PR un-marks the MediaProvider as internal, so that users can optionally disable it in via just the UI, instead of building a custom APK.

image

@mmatyas
Copy link
Owner

mmatyas commented Nov 12, 2023

The Media provider looks for assets for your games, but based on the other issue, and that none of the provider are turned on on your screenshot, I assume all your games already have those set manually. It does sound reasonable to disable the Media provider in that case. Thank you for your contribution!

@mmatyas
Copy link
Owner

mmatyas commented Nov 30, 2023

I was planning to update the provider name, but got a bit delayed... I'll just merge this first.

@mmatyas mmatyas merged commit 3476391 into mmatyas:master Nov 30, 2023
@nicjansma nicjansma deleted the media-provider-optional branch April 12, 2024 00:41
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