diff options
author | Eva <evauwu@riseup.net> | 2023-06-29 18:58:46 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-07-03 02:41:58 +0000 |
commit | 3ba446d0b065f867ca262a2e05e4e8d24c7c0783 (patch) | |
tree | 00fc996fba81293e07de97043318955cc2931cb4 /video/out/aspect.h | |
parent | c8a54a8c238aedc713cf7fb69f5802f83e614073 (diff) | |
download | mpv-3ba446d0b065f867ca262a2e05e4e8d24c7c0783.tar.bz2 mpv-3ba446d0b065f867ca262a2e05e4e8d24c7c0783.tar.xz |
TOOLS/lua/autoload: avoid unnecessary playlist manipulation, performance
We used to sort the playlist with playlist-move after every loadfile.
Instead, append all files in order and call playlist-move once to move
the only entry we don't control the position of.
Don't fetch every playlist item separately, reuse native property.
We used to pick up on new files added to the directory, but only when
playing an entry at the edge of the playlist due to an early return.
New files are now added to the playlist on every file change.
This still works as expected and doesn't load duplicate files on
shuffled playlists or playlists with files manually added after autoload
33% faster on average for my test directory with 1371 files.
Diffstat (limited to 'video/out/aspect.h')
0 files changed, 0 insertions, 0 deletions