How DockMaster Keeps Idle CPU Under 0.1%
Most macOS productivity tools silently drain your battery. Open Activity Monitor and you'll find clipboard managers, window tilers, and app launchers eating 2–5% CPU each — even when you're not using them. DockMaster idles at under 0.1% CPU. Here's how.
The Electron Problem
Many popular Mac utilities are built on Electron — a framework that bundles an entire Chromium browser inside every app. Even a minimal Electron app running "idle" maintains a browser process that consumes 100–300 MB of RAM and 1–3% CPU for its event loop, garbage collector, and rendering engine. Stack three or four of these tools and you're looking at a gigabyte of RAM and a noticeable hit to battery life — before you've even interacted with them.
100% Native Swift
DockMaster is written entirely in Swift using AppKit and native Apple frameworks. There is no embedded browser, no JavaScript runtime, no bridge layer between web technologies and macOS. The binary compiles directly to native ARM64 instructions on Apple Silicon. This alone eliminates the baseline resource overhead that Electron apps carry.
Event-Driven Architecture
DockMaster never polls. It uses an event-driven architecture powered by Grand Central Dispatch (GCD) and native macOS notification APIs. Here's what that means in practice:
- Window changes — DockMaster subscribes to AXUIElement accessibility notifications. When a window moves, resizes, or changes title, macOS pushes an event to DockMaster. No timer-based checking.
- Dock hover — the preview panel is only activated when macOS detects mouse entry on a Dock icon. Until that event fires, DockMaster does zero screen capture work.
- Clipboard — DockMaster observes the NSPasteboard change count. It checks only when macOS signals a pasteboard change — not on a loop.
- Edge snapping — mouse position tracking for edge zones is handled by CGEvent taps, which are kernel-level and essentially free when the mouse is not near an edge.
Native Apple APIs
Every major feature in DockMaster is built on a first-party Apple framework designed for efficiency: ScreenCaptureKit for window thumbnails (hardware-accelerated, minimal CPU overhead), AXUIElement for window metadata, NSPasteboard for clipboard, and Core Animation for smooth UI transitions. These APIs are optimized by Apple's own engineers for the exact hardware they run on.
No Background Daemons
Some productivity tools install helper daemons or launch agents that run even when the main app is closed. DockMaster is a single process. When you quit it, it's gone. No lingering helpers, no scheduled tasks, no background sync. Open Activity Monitor and search for "DockMaster" — you'll see exactly one process when it's running and zero when it's not.
Validated on Apple Silicon
DockMaster is tested and optimized for Apple Silicon (M1, M2, M3, M4). The app takes full advantage of the unified memory architecture and hardware-accelerated graphics. On a MacBook Air M2, DockMaster typically shows 0.0% CPU in Activity Monitor when idle, spiking briefly to 0.3–0.5% during active Dock hover previews, then dropping back immediately.
How to Check for Yourself
Open Activity Monitor (search for it in Spotlight), switch to the CPU tab, and look for DockMaster. You can also check the Energy tab to see its energy impact rating — it should consistently show "Low" or near-zero.
Compare this with your other running utilities. If you see Electron-based tools sitting at 2–5% CPU while idle, that's the difference native development makes.
The Bottom Line
Zero battery drain isn't an accident — it's the result of choosing native Swift over Electron, event-driven design over polling, and Apple APIs over cross-platform abstractions. DockMaster does more than most productivity tools while using a fraction of the resources. Your Mac stays cool, your battery lasts longer, and you never have to choose between productivity features and performance.