EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
M12.8: read the system memory every 30 s instead of 10 s
bflatastic3b6b390f681b
diff --git a/crates/ui-egui/src/prefs_live.rs b/crates/ui-egui/src/prefs_live.rsindex 9e730196d..9dd4d6398 100644--- a/crates/ui-egui/src/prefs_live.rs+++ b/crates/ui-egui/src/prefs_live.rs@@ -41,12 +41,13 @@ fn dropped_files(app: &mut EffectcraftApp, ctx: &egui::Context) {}}-/// Re-read the system's free memory every few seconds (cache budgets follow it).+/// Re-read the system's free memory every 30 s (cache budgets follow it; on Windows each+/// reading starts PowerShell in the background, so it isn't done more often).fn memory_watch(app: &mut EffectcraftApp, ctx: &egui::Context) {let now = ctx.input(|i| i.time);let id = egui::Id::new("prefs-memory-watch");let last = ctx.data(|d| d.get_temp::<f64>(id));- if last.is_some_and(|t| now - t < 10.0) {+ if last.is_some_and(|t| now - t < 30.0) {return;}ctx.data_mut(|d| d.insert_temp(id, now));