Repository navigation
Store the stem model in Application Support instead of Caches - #87
Merged
sanylax0 merged 1 commit intoJul 18, 2026
Merged
Conversation
Caches is OS-evictable, so the 158 MB HT-Demucs model could silently vanish and re-download at play time — a delay and a network/memory spike stacked exactly on playback start (the jetsam RCA's ~50 s window matches a silent re-download). Application Support persists; excluded from backup; existing Caches copies are migrated instead of re-downloaded.
sanylax0
approved these changes
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 3 of the jetsam RCA plan. The 158 MB HT-Demucs model lived in
Caches, which iOS evicts under storage pressure — so the model could silently vanish and re-download at play time, adding both a 10–30 s silent delay (which matches the observed ~50 s kill window) and a network/disk spike stacked on playback start, recurring across launches.How
StemModelStore.directorymoves to Application Support (isExcludedFromBackup, same pattern asStemCache).ensureModel()first migrates a survivingCachescopy via a rename instead of re-downloading. No other behavior changes.Testing
On device: after merging, first
ensureModelcall either migrates the existing file (instant) or downloads once; subsequent launches must never hit the network for the model. Verify with themem[model ensured]breadcrumb appearing immediately afterseparation task begin.🤖 Generated with Claude Code
https://claude.ai/code/session_013TJoWkqg8bzkGdzxWhWjWP
Generated by Claude Code