Repository navigation
Releases
Releases · mackoj/swift-har
0.1.1
Performance release. The public API and behaviour are unchanged.
Changed
- Building requests, responses and entries is about 25% faster, with a fifth fewer allocations. Writing and reading HAR files allocates 2 to 5% less.
- Bodies are validated as UTF-8 over buffers instead of iterating
Data. - Header and cookie-attribute names are compared without lowercased copies. Non-ASCII names keep
lowercased()semantics. - Query and form values with nothing to percent-decode are not copied.
- ISO 8601 dates in 1900–9999 are written and read without creating a
Date.ISO8601FormatStyleper date. HAR.Archive(json:)no longer copies its input when there is no byte order mark.
- Bodies are validated as UTF-8 over buffers instead of iterating
| Benchmark (p50, Apple silicon) | 0.1.0 | 0.1.1 |
|---|---|---|
| Build an entry | 25.9 µs, 71 mallocs | 19.2 µs, 56 mallocs |
| Build a request | 9.5 µs, 40 mallocs | 8.1 µs, 26 mallocs |
| Build a response | 15.9 µs | 10.9 µs |
| Encode a 1000-entry log | 59.7 ms | 58.4 ms |
| Decode a 1000-entry log | 71.8 ms | 70.5 ms |
Added (repository only)
Benchmarks/package on package-benchmark, with profiling tools (docs/performance.md).Architecture/package with swift-llm-check rules (docs/architecture-rules.md).
0.1.0
Update the handoff after the URLSession adapters landed (#4) Tagging 0.1.0 is left to the maintainer: cloud sessions cannot push tags or create releases. Claude-Session: https://claude.ai/code/session_012PZtDNGdh3c7qvwthsmHdz Co-authored-by: Jeffrey Macko <jeffrey@macko.fr> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>