Performance
How the Suite's speed is measured, what the baseline is, and how to tell a regression from noise (#76). Every number here comes from a repeatable run, never from impressions.
The run
scripts/perf/measure.mjs drives Chromium (Playwright) against a local
production build and reads its own counters: CDP Performance and HeapProfiler
in the browser, Navigation and Resource Timing for the network, ps for the
server process, and a probe of /api/health every 500 ms as the server's
responsiveness while everything else runs.
| Scenario | What it shows |
|---|---|
| pages | First load of drones, drone detail, its flight logs tab, customers, customer detail, licences and Drone Control: timings, heap, DOM nodes, requests and API latency |
| repeat | The same tab cycling through every page: heap, nodes and listeners after garbage collection, to catch accumulation |
| dwell | Drone Control left open for a minute: requests per minute, heap and listeners before and after |
| hidden | The same page reported hidden, as a background tab: what keeps running |
| offline | 20 s without network, then back: attempts while offline and time to the first answer after |
| tabs | Three Drone Control tabs at once: what the server receives |
Running it
- Build for production with the local flags:
NEXT_PUBLIC_ENV=test NEXT_PUBLIC_SITE_URL=http://localhost:3100 NEXT_PUBLIC_DRONE_CONTROL_LTE_ENABLED=true NEXT_PUBLIC_DRONE_VIDEO_MEDIAMTX_ENABLED=true npx next build, then copy.next/staticandpublicinto.next/standalone, asscripts/node/build.mjsdoes. - Optionally make a larger copy of the local database:
node scripts/perf/seed-volume.mjs .local/suite-test.db .local/suite-perf.db 20. It clones the existing rows with fresh ids; it refuses to write over its source. - Start
node .next/standalone/server.jswithPORT=3100,NODE_ENV=production,SUITE_DATABASE_PATHpointing at the database and a throwawayAUTH_SESSION_SECRET. - Run
node scripts/perf/measure.mjs --base http://localhost:3100 --pid <server pid> --db <the database> --secret <that secret> --out run.json.
A production build refuses the local test sign-in by design, so the run mints the local test administrator's session cookie itself with the secret the local server was started with. Never point it at a deployed Suite.
Baseline, 9 November 2026
MacBook Pro (Darwin arm64), Chromium 141 headless, 1440×900, production build of
develop at af69386, local SQLite. Production at the time held 2 customers,
5 drones, 197 flight logs and 108 media, on a 2-vCPU, 1 GB server.
| Data | Customers | Drones | Flight logs | Documents | Media |
|---|---|---|---|---|---|
| Current (test database, production order of magnitude) | 4 | 9 | 29 | 50 | 29 |
| Growth (×20 copy) | 44 | 109 | 4,029 | 1,050 | 2,029 |
Pages, first load
| Page | LCP current / growth | Main-thread tasks (ms) | DOM nodes | JS heap (MB) | Slowest API |
|---|---|---|---|---|---|
| Drones | 68 / 80 ms | 61 / 92 | 869 / 4,855 | 5.8 / 6.5 | 8 ms |
| Drone detail | 76 / 68 ms | 70 / 77 | 630 / 833 | 6.3 / 6.2 | 4 ms |
| Drone flight logs tab | 80 / 64 ms | 138 / 152 | 1,961 / 2,380 | 9.2 / 8.5 | 4 ms |
| Customers | 64 / 60 ms | 57 / 67 | 490 / 1,930 | 5.6 / 5.7 | 4 ms |
| Customer detail | 68 / 68 ms | 63 / 67 | 437 / 705 | 5.6 / 5.8 | 5 ms |
| Licences | 68 / 64 ms | 67 / 72 | 543 / 1,218 | 5.5 / 6.2 | 4 ms |
| Drone Control | 576 / 672 ms | 122 / 144 | 691 / 691 | 6.8 / 7.2 | 19 ms (fleet) |
Pages are rendered on the server; the browser makes two or three API calls per page. Drone Control is the heaviest load (about 400 KB, 185 KB of it scripts), and its LCP is the satellite map.
Over time
- No accumulation in the browser. Five rounds through every page in one tab end at the same heap (5.8 MB), nodes (324) and listeners (584) after GC, on both data sets. A minute on Drone Control leaves nodes and listeners unchanged and the heap within 0.1 MB.
- Server memory is not yet flat. The Node process grows from about 110 MB
to 210 MB during the first run (caches and JIT warming), then by 2–5 MB per
run: 223, 224, 226 and 230 MB at the end of four more runs, 236 MB a moment
after. That is too short to tell a slow leak from a heap V8 has not collected
yet.
/api/healthanswers in 3–4 ms (p95) throughout, never failing. - Drone Control polling. One batched
POST /api/drones/gateway-tokensper tab, on connect and about every minute; with no gateway reachable (local runs) the links' reconnect attempts bring it to 4–5 a minute. Three tabs make three times the requests: about 10–12 a minute in all. - Network loss. About seven attempts during 20 s offline; the first API answer arrives about 60 ms after the network returns.
Findings
Nothing measured in the browser needs fixing at today's volume or at twenty times it: no API takes more than 20 ms, no page more than 152 ms of main-thread work, and nothing grows in the browser over time. Residual items, with their measured cost:
-
Server memory creeps by 2–5 MB per run after warm-up (above). On the 1 GB production server that is not urgent, but it needs a longer soak with heap snapshots before it can be called a leak or ruled out.
-
A hidden Drone Control tab keeps its links working (2–4 requests a minute in local runs). Pausing them is not done: the Drone Control telemetry and alarms are meant to keep running in the background, so it is a product decision, not a performance fix.
-
The drones list renders every row: about 45 DOM nodes per drone, 4,855 at 109 drones, still 92 ms of main-thread work. Worth paginating if fleets reach several hundred drones.
-
The flight logs tab is the busiest page (138–152 ms of tasks), mostly the table and its summary; it does not grow with the number of logs at this scale.
-
Drone Control's LCP (0.6–0.7 s) is the external satellite tiles, not the Suite.
-
Cancelled Next.js prefetch requests show as "failed" in the run: harmless.
Catching a regression
Rerun on the same machine and data and compare with the tables above. Treat as a regression, worth a look before merging:
- any page's main-thread tasks or LCP up by more than 50 %, or the LCP of a page other than Drone Control above 500 ms;
- any API above 50 ms median;
- heap, nodes or listeners rising from one repeat round to the next, or after the dwell;
- Drone Control above 10 requests a minute in one tab, or a hidden tab doing more than a visible one;
- server memory rising faster than the 2–5 MB per run measured here, or
/api/healthp95 above 20 ms.
Not yet covered: a mobile CPU profile, real network conditions (with #53 for video), and the server under several concurrent users.