mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-27 19:47:35 -06:00
M5.6: preview-source cache holds 4 sources (current + prefetched neighbours) instead of 10 (~300 MB less)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d4e28f5cf3
commit
c2a09ed8e9
@@ -146,7 +146,7 @@ impl MediaCache {
|
||||
SourceLevel::Preview => {
|
||||
self.previews.retain(|(p, _)| *p != id);
|
||||
self.previews.push((id, img));
|
||||
let cap = if self.preview_capacity == 0 { 10 } else { self.preview_capacity };
|
||||
let cap = if self.preview_capacity == 0 { 4 } else { self.preview_capacity };
|
||||
while self.previews.len() > cap {
|
||||
self.previews.remove(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user