切換面板不再轉彩球,畫面終於跟得上手
你在面板間點來點去查用量時,畫面不該每次都像重新拆箱再組裝。之前若面板剛好被 LRU cache(快取,把算過的結果暫存起來直接用)擠出去,切回去得從磁碟重讀 HTML 並重組;現在每個面板組好的內容會留著,只建一次。切換時也不再讓主執行緒(專門處理你點擊與畫面的主要工作線)硬做設定同步,連著兩次刷新更不會重複打包同一份狀態。舊面板的清理改在點擊之後處理,就像店員先替你打開下一扇門,再慢慢收回前一間的展示架;換面板時終於不必盯著彩球等它回神。
發布日期:2026-07-18
你在面板間點來點去查用量時,畫面不該每次都像重新拆箱再組裝。之前若面板剛好被 LRU cache(快取,把算過的結果暫存起來直接用)擠出去,切回去得從磁碟重讀 HTML 並重組;現在每個面板組好的內容會留著,只建一次。切換時也不再讓主執行緒(專門處理你點擊與畫面的主要工作線)硬做設定同步,連著兩次刷新更不會重複打包同一份狀態。舊面板的清理改在點擊之後處理,就像店員先替你打開下一扇門,再慢慢收回前一間的展示架;換面板時終於不必盯著彩球等它回神。
When you hop between panels to check usage, the app should not unpack and rebuild a room every time. If a panel had been pushed out of the small LRU cache, switching back used to reread its HTML from disk and assemble it again. Now each panel keeps its finished markup and builds it only once. Switching also stops forcing settings synchronization on the main thread, duplicate back-to-back refreshes no longer repackage unchanged state, and cleanup of an old panel happens after your click. Like a shop attendant opening your next door before tidying the last display, rather than making you wait in the aisle.
**Switching panels no longer stalls the UI with a beachball**: cold-rebuilding a panel view (evicted from the small LRU cache) reread and reassembled its HTML from disk every time — now the assembled markup is cached per panel and only built once. Selecting a panel no longer forces `NSUserDefaults.synchronize()` on the main thread. Unchanged panel state is no longer redundantly re-serialized and re-injected when a switch triggers two refresh passes back to back. Evicting an old cached panel view from the LRU cache is now deferred off the click's run-loop turn instead of running inline with the new panel's setup.