Skip to content

fix(worker): stop capping VapourSynth's frame cache at 1 GB (#107) - #116

Merged
StuartCameronCode merged 1 commit into
mainfrom
fix-107-max-cache-size
Oct 5, 2026
Merged

StuartCameronCode merged 1 commit into
mainfrom
fix-107-max-cache-size

Conversation

@StuartCameronCode

Copy link
Copy Markdown
Owner

Fixes #107.

Problem

Both templates set core.max_cache_size = 1024. The bundled VapourSynth R78 picks 8192 MB for itself on a 16 GB Mac, so the line cut the cache to an eighth. On HD sources that starves QTGMC's threads; the reporter saw ~1 fps and a log full of memory usage still over the limit, flushing pipeline.

Bare haf.QTGMC, synthetic interlaced 4:2:2, bundled vspipe (macos-arm64, 8 threads):

Source Preset Cache (MB) fps
1920x1080 Slower 1024 6.5
1920x1080 Slower default (8192) 18.0
1920x1080 Very Slow 1024 1.9
1920x1080 Very Slow default (8192) 14.7
720x576 Slower 1024 92.8
720x576 Slower default (8192) 89.5

SD never reaches the cap, which is why no test noticed.

Change

  • Neither template sets the cache size on its own any more.
  • Settings → Output → VapourSynth Cache → Override max cache size (EncodingSettings.maxCacheSizeMb, MB, off by default) writes core.max_cache_size into both the encode and preview scripts. 0 is treated as off.

Testing

  • Rust test_162: both scripts, with and without the override.
  • Flutter: script-generation test in integration_filter_parameters_test.dart, model tests in max_cache_size_test.dart.
  • One real encode run locally with the cap removed.

Not measured: the default VapourSynth picks on Windows/Linux or on an 8 GB machine. The new control has not been checked by eye in the running app.

🤖 Generated with Claude Code

https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN

Both templates set core.max_cache_size = 1024, an eighth of what
VapourSynth picks for itself on a 16 GB machine. On HD sources that
starved QTGMC's threads: 1080i Very Slow ran at 1.9 fps instead of 14.7.

The templates now leave the cache to VapourSynth. Settings -> Output
gains "Override max cache size" for anyone who needs a specific limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GLXdGLfPwgYjW1AkonGqN
@StuartCameronCode
StuartCameronCode merged commit 2393571 into main Oct 5, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

vs.core max cache size setting low

1 participant