diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2023-11-17 19:31:51 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-01-31 15:38:21 +0000 |
commit | 69891c4070f03236c3843fd49e6ee69a46dfe82c (patch) | |
tree | 9814b028f40bf6d6dda2790c5df97d54e5145fbd /DOCS/man/options.rst | |
parent | a59b8edb96cbadbf61f30ec563bddee7701d984a (diff) | |
download | mpv-69891c4070f03236c3843fd49e6ee69a46dfe82c.tar.bz2 mpv-69891c4070f03236c3843fd49e6ee69a46dfe82c.tar.xz |
vo_gpu_next: save cache to separate files
Save the cache to separate files to avoid loading/saving a huge combined
libplacebo.cache. This approach allows the saving of only new cache
objects and avoids resaving the entire cache, especially even if only a
tiny change was made.
This commit improves the cold start time of mpv and avoids saving data
when it's not necessary.
Number of changes were made:
- each cached object is saved in its own file
- cache files are prefixed with the name of cached object
- cache directory is cleaned on each uninit
- the least recently used cache files are removed if cumulative cache
size is above limit
- files used in the recent 24 hours are not removed to allow changes
to mpv.conf without worrying about the cache being removed during
experimentation
- shader cache size limit is set to 128 MiB
- icc cache size limit is set to 1.5 GiB
- cache objects are loaded/saved as needed
This commit eliminates the runtime performance penalty associated with
the size cache. While we continue to maintain the cache limit to prevent
retaining stale objects, mpv now only loads a small subset of files that
are currently required for playback, instead of loading all files.
Diffstat (limited to 'DOCS/man/options.rst')
-rw-r--r-- | DOCS/man/options.rst | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 0807292ffc..548548dfff 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -6869,8 +6869,11 @@ them. files contain uncompressed LUTs. Their size depends on the ``--icc-3dlut-size``, and can be very big. - NOTE: On ``--vo=gpu``, this is not cleaned automatically, so old, unused - cache files may stick around indefinitely. + On `--vo=gpu-next`, files that have not been accessed in the last 24 hours + may be cleared if the cache limit (1.5 GiB) is exceeded. + + On ``--vo=gpu``, this is not cleaned automatically, so old, unused cache + files may stick around indefinitely. ``--icc-cache-dir`` The directory where icc cache is stored. Cache is stored in the system's @@ -7018,11 +7021,14 @@ them. ``--gpu-shader-cache`` Store and load compiled GLSL shaders in the cache directory (Default: ``yes``). Normally, shader compilation is very fast, so this is not usually - needed. It mostly matters for anything based on D3D11 (including ANGLE), as - well as on some other proprietary drivers. Enabling this can improve startup - performance on these platforms. + needed. It mostly matters for anything involving GLSL to SPIR-V conversion, + that is: D3D11, ANGLE or Vulkan, as well as on some other proprietary + drivers. Enabling this can improve startup performance on these platforms. + + On `--vo=gpu-next`, files that have not been accessed in the last 24 hours + may be cleared if the cache limit (128 MiB) is exceeded. - NOTE: On ``--vo=gpu``, is not cleaned automatically, so old, unused cache + On ``--vo=gpu``, this is not cleaned automatically, so old, unused cache files may stick around indefinitely. ``--gpu-shader-cache-dir`` |