diff options
author | Dudemanguy <random342@airmail.cc> | 2023-10-25 18:17:25 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-26 16:49:56 +0000 |
commit | b9c42755a75d74f5cd48737e714d31589fcac6a0 (patch) | |
tree | ec3d9db28c1f762844008ef64a2435170a9e150c /DOCS/man | |
parent | 1be0d0aa844a6c72b25d9b21244a81fd96e96ee9 (diff) | |
download | mpv-b9c42755a75d74f5cd48737e714d31589fcac6a0.tar.bz2 mpv-b9c42755a75d74f5cd48737e714d31589fcac6a0.tar.xz |
javascript: use --js-memory-report option instead of MPV_LEAK_REPORT
The MPV_LEAK_REPORT environment variable was previously read in order to
determine whether or not to enable memory reporting for javascript
scripts. This is kind of weird and deviates from the norm of exposing an
option to the user. So let's just add --js-memory-report and disable it
by default instead.
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/options.rst | 6 | ||||
-rw-r--r-- | DOCS/man/stats.rst | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 49832a4804..5f986f4126 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -993,6 +993,12 @@ Program Behavior - ``--ytdl-raw-options=proxy=[http://127.0.0.1:3128]`` - ``--ytdl-raw-options-append=proxy=http://127.0.0.1:3128`` +``--js-memory-report=<yes|no>`` + Enable memory reporting for javascript scripts in the stats overlay. + This is disabled by default because it has an overhead and increases + memory usage. This option will only work if it is enabled before mpv is + started. + ``--load-stats-overlay=<yes|no>`` Enable the builtin script that shows useful playback information on a key binding (default: yes). By default, the ``i`` key is used (``I`` to make diff --git a/DOCS/man/stats.rst b/DOCS/man/stats.rst index fc6ea37c46..88238bcf93 100644 --- a/DOCS/man/stats.rst +++ b/DOCS/man/stats.rst @@ -225,8 +225,8 @@ are missing. Memory usage is approximate and does not reflect internal fragmentation. JS scripts memory reporting is disabled by default because collecting the data -at the JS side has an overhead. It can be enabled by exporting the env var -``MPV_LEAK_REPORT=1`` before starting mpv, and will increase JS memory usage. +at the JS side has an overhead and will increase memory usage. It can be +enabled by setting the ``--js-memory-report`` option before starting mpv. If entries have ``/time`` and ``/cpu`` variants, the former gives the real time (monotonic clock), while the latter the thread CPU time (only if the |