Repository navigation
Fit the panel on screen; cheaper daemon ticks and energy sampling - #2
Merged
Merged
Conversation
- With Settings open the panel was taller than a 14" screen and ran off the bottom, in the popover and in the window. It is now capped at the screen's height and the tab scrolls between the fixed header and footer. - Daemon: SMC key info is looked up once, and each key is read once per tick instead of twice (about 3x less CPU per tick). - Energy tab: app names are cached; a sample took 6.7 ms, now 1.5 ms. - The automatic update checks switch now flips right away, and turning it off hides the update banner, as it does at launch. - "Resumes at X%" now matches when charging actually resumes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PanelStacklayout keeps the panel's height exact, so the popover and window size to it as before (a plain VStack made the window open at its 214 pt minimum).smc.c(halves kernel calls per read) and each key is read once per tick instead of twice. SMC read: 0.5–0.7 ms → 0.21 ms; tick ≈ 3.5 ms → 1.1 ms.EnergyMonitor.sample()6.7 ms → 1.5 ms.pct <= limit - sailing)../build.sh snapshot) keep rendering the full tab: without a height cap there's no ScrollView, which ImageRenderer can't draw.Checked
./build.sh test: all policy tests pass.