Empirical memory deltas (heapUsed, RSS, ArrayBuffers) measured across 3 passes per payload size.
Analytical Conclusion: The measurements
support sublinear memory growth and demonstrate that MailPort does not buffer the complete
attachment in memory under the tested conditions.
Note: Throughput figures represent local synthetic loopback stream processing. Real-world SMTP delivery speed depends on remote server socket capacity and network latency.
Note: Throughput figures represent local synthetic loopback stream processing. Real-world SMTP delivery speed depends on remote server socket capacity and network latency.
MULTI-PASS STREAMING MIME BENCHMARK
| TARGET PAYLOAD | EMITTED PAYLOAD | MEDIAN THROUGHPUT | MEDIAN HEAP Δ | WORST HEAP Δ | MEDIAN RSS Δ | MEDIAN ARRAYBUFFER Δ |
|---|---|---|---|---|---|---|
| 10 MB | 13.7 MB | 540.1 MB/s | 15.7 MB | 17.8 MB | 14.6 MB | 10.8 MB |
| 100 MB | 136.8 MB | 589.4 MB/s | 48.1 MB | 74.6 MB | 68.2 MB | 34.9 MB |
| 500 MB | 684.2 MB | 597.6 MB/s | 74.6 MB | 74.6 MB | 70.7 MB | 49.7 MB |
BENCHMARK ENVIRONMENT & METHODOLOGY
- • Node.js: v24.18.0 (with
--expose-gc) - • OS / Architecture: macOS (Darwin ARM64)
- • Sampling Protocol: Pre-run garbage collection baseline comparison over 3 passes per size
-
• Command:
node --expose-gc --import tsx packages/mime/src/benchmark.ts