diff options
author | wm4 <wm4@nowhere> | 2020-04-10 13:36:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-04-10 13:36:10 +0200 |
commit | c2ee7bce4cab472f1378b4b2a9e69c5f18223f3c (patch) | |
tree | 3ba3452e986815599bb673f859d37e9b84a224da /DOCS | |
parent | e5d49f662e9e925fa405c3cfb9ffa3e743044dd8 (diff) | |
download | mpv-c2ee7bce4cab472f1378b4b2a9e69c5f18223f3c.tar.bz2 mpv-c2ee7bce4cab472f1378b4b2a9e69c5f18223f3c.tar.xz |
console: reduce memory usage in default mode
This used 1 MB due to building the complete command and property list
when starting the script. These are needed only for auto-completion, so
build them only on demand. Since building them is fast enough, rebuild
them every time.
The key bindings table is not that much, but saves some KBs. Oddly, the
code to build it uses less memory than the table at runtime (???), so
build it at runtime as well.
Add 2 tactic collectgarbage() calls as well. This frees unused heap when
it is known that the script is going to be completely inactive until
re-enabled by the user.
Diffstat (limited to 'DOCS')
0 files changed, 0 insertions, 0 deletions