Skip to content
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

give an option to improve performance on low-powered devices #747

Open
jose1711 opened this issue Dec 28, 2017 · 2 comments
Open

give an option to improve performance on low-powered devices #747

jose1711 opened this issue Dec 28, 2017 · 2 comments

Comments

@jose1711
Copy link

i suggest here to add new command line switches to be able to set both mpv_version and mpv_options manually (by user). the reason would be that runnig mpv --version and especially mpv --list-options substantially contribute to the total startup time.

some stats from my raspberry pi zero. startup time measure using time echo q | mpsyt

stock 0.2.7.1:
32--39 seconds

hardcoded mpv_version and mpv_options (removing function calls):
18--23 seconds

i am not suggesting to remove the detection, only adding an option to disable (somewhat expensive) detection should a user provide this information beforehand.

@ids1024
Copy link
Contributor

ids1024 commented Dec 29, 2017

Interesting; I wouldn't really expect this to take very long. This is a sort of awkward thing to add, but I can't think of a better way, unless mpv is doing something silly that can be fixed there.

Loading youtube_dl is probably also a noticeable contributor to startup time; I know they added some experimental code to help with that (ytdl-org/youtube-dl#8497) but I'm not sure what the current status is.

@jose1711
Copy link
Author

it was a bit of a surprise to me as well. mpv --version alone takes 7--8 seconds, mpv --list-options roughly the same. 14-15 seconds difference is confirmed by the previous "benchmark".

i admit the proposal is more of a workaround to an unbearably slow startup time of mpv. by looking at strace output it's opening 270 files (audio libraries, samba, etc) so i am a bit skeptical when/if mpv maintainers fix it. also note that mpv --version also reports ffmpeg libraries versions (which are somewhat useless for mpv if i understand it correctly). maybe this contribute to the startup time as well.

was experimenting with slimming down of youtube_dl extractors but in the end i gave up so thank you for the link, will check it as well.

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

No branches or pull requests

2 participants