oxc-project
oxc-sourcemap
BlogDocsChangelog

feat: reduce peak memory usage with `.shrink_to_fit()`

#172Merged
Comparing
09-27-feat_reduce_peak_memory_usage_with_.shrink_to_fit_
(
d9318ae
) with
main
(
e336929
)
CodSpeed Performance Gauge
0%
Untouched
5

Benchmarks

Passed

generate_lookup_table
benches/simple.rs::sourcemap::bench::SourceMap
CodSpeed Performance Gauge
0%
1.3 µs1.3 µs
add_name_add_source_and_content
benches/simple.rs::sourcemap::bench::SourceMapBuilder
CodSpeed Performance Gauge
0%
1.7 µs1.7 µs
from_json_string
benches/simple.rs::sourcemap::bench::SourceMap
CodSpeed Performance Gauge
0%
16.9 µs16.9 µs
to_json_string
benches/simple.rs::sourcemap::bench::SourceMap
CodSpeed Performance Gauge
0%
5.5 µs5.5 µs
to_json
benches/simple.rs::sourcemap::bench::SourceMap
CodSpeed Performance Gauge
0%
5.7 µs5.7 µs

Commits

Click on a commit to change the comparison range
Base
main
e336929
0%
feat: reduce peak memory usage with `.shrink_to_fit()` Trade performance for memory. The tokens array take enormously large amount of data, which is not ideal for large applications. For checker.ts, Capacity before and after are 262144 and 171174 respectively.
d9318ae
3 months ago
by Boshen
© 2025 CodSpeed Technology
Home Terms Privacy Docs