usage

usage 0.28.10

工具與目錄
在這頁

修正 1 項

01

切換面板不再轉彩球,畫面終於跟得上手

你在面板間點來點去查用量時,畫面不該每次都像重新拆箱再組裝。之前若面板剛好被 LRU cache(快取,把算過的結果暫存起來直接用)擠出去,切回去得從磁碟重讀 HTML 並重組;現在每個面板組好的內容會留著,只建一次。切換時也不再讓主執行緒(專門處理你點擊與畫面的主要工作線)硬做設定同步,連著兩次刷新更不會重複打包同一份狀態。舊面板的清理改在點擊之後處理,就像店員先替你打開下一扇門,再慢慢收回前一間的展示架;換面板時終於不必盯著彩球等它回神。

官方原文

**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.