Storing SwiftUI @ScaledMetric values in a shared global model caused memory spikes because scaling was recalculated on every environment change, triggering view rebuilds across the entire tree. The fix was keeping scaling state local to individual views rather than pushing it into global state, preventing cascading rebuilds and memory growth over time.

1m watch time

Sort: