necodoc / Performance

Performance

Numbers from a script you can rerun on your own hardware.

Every performance figure on this site comes from pnpm bench, which starts a throwaway necodoc stack and measures it through the public API. The machine, date and commit sit next to every number.

Apple M5, 10 cores, 32 GBmeasured 2026-10-12 · commit b359f12local stack, sequential latency, 100 samples

Latency

One request at a time, through /api/v1.

Client round trip, request sent to last PDF byte, after warm-up. Bars are p50; the whisker runs to p95.
HTML to PDF, 1 page: p50 15 ms, p95 18 ms, p99 20 ms, 100 samplesHTML to PDF, 1 page15 ms · 18 msHTML to PDF, invoice with header/footer: p50 30 ms, p95 35 ms, p99 45 ms, 100 samplesHTML to PDF, invoice with header/footer30 ms · 35 msDesigned template, surety bond: p50 21 ms, p95 25 ms, p99 30 ms, 100 samplesDesigned template, surety bond21 ms · 25 msOverlay, AcroForm bond (Phoenix AZ): p50 28 ms, p95 32 ms, p99 36 ms, 100 samplesOverlay, AcroForm bond (Phoenix AZ)28 ms · 32 msOverlay, flat bond (Rockville MD): p50 28 ms, p95 30 ms, p99 38 ms, 100 samplesOverlay, flat bond (Rockville MD)28 ms · 30 ms036 ms
Round trip per scenario, p50 bar and p95 whisker, in milliseconds.
ScenarioPagesp50p95p99n
HTML to PDF, 1 page115 ms18 ms20 ms100
HTML to PDF, invoice with header/footer330 ms35 ms45 ms100
Designed template, surety bond221 ms25 ms30 ms100
Overlay, AcroForm bond (Phoenix AZ)128 ms32 ms36 ms100
Overlay, flat bond (Rockville MD)328 ms30 ms38 ms100

Throughput

Batch documents per minute, by worker count.

One JSON batch, timed from creation to its last row, queue time included. One worker per server.
1 worker: 5,950 docs/min1 worker5,9502 workers: 11,300 docs/min2 workers11,3004 workers: 22,010 docs/min4 workers22,0108 workers: 43,430 docs/min8 workers43,430045,602 docs/min
Documents per minute for one batch, by number of workers, one worker per server.
WorkersDocs/min
15,950
211,300
422,010
843,430

Cold start and archival

What a fresh worker and PDF/A cost.

30 ms
First render, fresh worker
p50, first job once the worker is ready
16 ms
Same render, warm
p50 on the same worker
1.33 s
Worker process to ready
p50, includes starting Chromium
77 ms
PDF/A-2b + PDF/UA overhead
p50 added to the invoice

In production

Your own numbers, on every render.

In production, the generation log records the queue wait, run time and a per-step breakdown for every PDF. Admin › System shows p50, p95 and p99 over a window you select.

Generation log with a render-time histogram and p50, p95 and p99
Everything is local.

Postgres on the same machine with default settings, local disk storage, calls over loopback. No network, S3 or Azure round trips, TLS or proxy.

The test documents are ours.

Render time grows with pages, images, fonts and table size. The test set is typical insurance documents. It isn't a worst case.

Throughput includes the queue.

Each run is timed from the batch's creation to its last row, so it includes the time a job waits for a worker slot. RENDER_CONCURRENCY sets the slots per worker.

Cold start means a new process.

It measures the first job on a new worker. A worker starts Chromium and opens its pages before it takes jobs. It doesn't measure a container or node cold start.

Latency is sequential.

One request at a time. It says nothing about latency under concurrent load.

CPUApple M5, 10 cores
Memory32 GB
OSmacOS 27.0
Nodev24.21.0
Chromium151.0.7922.34
PostgresPostgreSQL 18.6 (Homebrew)
Storagedisk (local temp directory)
Commitb359f12
Load average before4.69 / 5.16 / 5.99

Rerun it

On your hardware, against your Postgres.

The benchmark creates its own database and starts its own processes. It removes both when it ends, even after a failure, and never touches another necodoc install.

# once: the Chromium build the API pins
pnpm --filter @necodoc/api chromium:install

# the full run (under fifteen minutes on a laptop)
pnpm bench

# samples, batch rows, worker counts, concurrency
pnpm bench --help