# A bounded event pipeline for a macOS app

Bounded event buffers and logging after a recorded macOS incident with 41 MB per second growth and 111 GB of compressed pages on a 36 GB machine; a recorded full test run reduced core log lines from 610,996 to 1,411.

September 2026

Situation. On 2026‑09‑01, diagnostic reports recorded 111 GB of compressed pages for the macOS app on a 36 GB machine. A separate footprint sample recorded growth of about 41 MB per second while a connection retry loop emitted core events.

Task. The event path needed explicit memory bounds. A burst of core log events was retained in an unbounded main stream and copied to seven subscriber streams whose consumers did not use those log events.

Action. Buffers were bounded, subscriptions filtered by event type and logging given a rate budget. Overflow handling makes the trade explicit: repetitive diagnostic events may be dropped, and affected state can be refreshed rather than retaining unlimited events. Architecture checks and application‑budget tests defend the bounded design.

Result. The incident record documents a full test‑run comparison: core log lines fell from 610,996 to 1,411, and captured log size from 63 MB to 388 KB. These are recorded test‑run measurements, not a production traffic benchmark or a measured post‑fix memory figure. The logging change alone did not fix separate shutdown timeouts; those required their own correction.

Role: macOS Application Engineer
=> /categories/solution-architecture/ Categories: Solution Architecture
=> /categories/frontend/ Categories: Frontend Engineering
=> /categories/reliability/ Categories: Reliability & Backups
=> /categories/observability/ Categories: Monitoring & Observability
=> /categories/performance/ Categories: Performance Tuning
=> /categories/testing/ Categories: Testing & QA
=> /services/platform-architecture/ Services: Platform & Solution Architecture
=> /services/frontend-development/ Services: Frontend Development
=> /services/site-reliability/ Services: Site Reliability & Monitoring

=> https://software.engineer.company/portfolio/an-app-that-ate-41-mb-a-second-stopped/ This page on the web
