Menu

1 / 3

How I keep a Mac system monitor under 0.3% CPU

DEV Community: swift·Zernonia·3 days ago
#C497Nrr6
#devtoswift#devto#dev#popover#every
Long article (2070 words) — no AI summary yet.
Reading 0:00
15s threshold

The first rule I wrote down for Stat Space wasn't a feature. It was a number: under 0.3% of one core and under 25 MB at idle , on an M1, sampling every second with the popover closed. A system monitor that shows up in its own top-apps list has failed at the one thing it's for.

This post is how that budget is actually met: what runs, what doesn't, and the measurement that keeps me honest. None of it is exotic. Most of it is saying no to work.

Start with the budget, not the features

The budget lives in the project's agent handover file and the spec, above any feature list:

Under 0.3% CPU and under 25 MB at idle (M1, 1 s sampling, popover closed).

Under 2% CPU with the popover open on Home.

No allocations in the sampling hot path. Every series is a fixed-size ring buffer.

A status item redraws only when its displayed value changes.

One detail I got wrong at first: "25 MB" of what?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.