Skip to content
EngineerPlatform
Menu
Design
English

Engineer / Platform / Portfolio

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.

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.

Cases · 2026

How events reach consumers and logs

  1. Native events

    Native code publishes application events for consumers.

  2. Typed, bounded subscriptions

    Typed, bounded subscriptions deliver events and retain a limited history.

  3. Log budget

    The log budget controls how much event detail reaches written logs.

Implementation overview of event delivery and logging; the case distinguishes full test-run log volume from user-session performance.

Contact

Still working out what you need?

Tell us what is going wrong, or what you are trying to build. We will tell you what it would take, roughly what it would cost, and whether we are the right people for it.

From 1,400 DKK an hour, excluding VAT — and less per hour on a longer booking.

welcome@engineer.company +45 50 10 61 84 Copenhagen, Denmark