web-infra-dev
rspack
BlogDocsChangelog

refactor: replace UsageCallback closure with InnerGraphUsageOperation enum

#12619Merged
Comparing
refactor/used-by-exports
(
6aad2c9
) with
main
(
6a1fbdd
)
CodSpeed Performance Gauge
0%
Untouched
16
Skipped
1

Benchmarks

Skipped (1)

Passed

bundle@basic-react-production-sourcemap
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle
CodSpeed Performance Gauge
0%
705 ms701.5 ms
rust@build_chunk_graph
xtask/benchmark/benches/groups/build_chunk_graph.rs::chunk_graph::build_chunk_graph_benchmark
CodSpeed Performance Gauge
0%
116.5 ms116 ms
bundle@basic-react-development
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle
CodSpeed Performance Gauge
0%
346.8 ms345.4 ms
bundle@basic-react-production
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle
CodSpeed Performance Gauge
0%
548.9 ms547.3 ms
bundle@threejs-production
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle
CodSpeed Performance Gauge
0%
1.6 s1.6 s
bundle@threejs-production-sourcemap
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle
CodSpeed Performance Gauge
0%
2 s2 s
js@Traverse compilation.modules
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
0%
64.8 µs64.7 µs
js@is css mod
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
0%
87.2 µs87.1 µs
js@record chunk group
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
0%
78.3 µs78.2 µs
js@stats.toJson()
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
0%
23.3 ms23.3 ms
js@Traverse module graph by connections
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
0%
260.4 µs260.3 µs
js@record module
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
0%
1.9 ms1.9 ms
js@collect imported identifiers
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
0%
208 µs208 µs
bundle@threejs-development
xtask/benchmark/benches/groups/bundle.rs::bundle::bundle_benchmark::bundle
CodSpeed Performance Gauge
0%
738.3 ms739.7 ms
js@Traverse module graph by dependencies
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
-1%
514.7 µs517.4 µs
js@external getResolve
tests/bench/ts-react.bench.ts::TypeScript React project
CodSpeed Performance Gauge
-2%
1.5 ms1.5 ms

Commits

Click on a commit to change the comparison range
Base
main
6a1fbdd
-0.01%
refactor: replace UsageCallback closure with InnerGraphUsageOperation enum Replace the closure-based UsageCallback pattern in InnerGraphPlugin::on_usage with an InnerGraphUsageOperation enum for better performance and code clarity. Changes: - Add InnerGraphUsageOperation enum with three variants: - PureExpression(DependencyRange) - ESMImportSpecifier(usize) - URLDependency(usize) - Update on_usage to accept enum instead of closure - Update infer_dependency_usage to match on enum variants - Update 11 call sites across plugin.rs, esm_import_dependency_parser_plugin.rs, and url_plugin.rs
6aad2c9
2 days ago
by JSerFeng
© 2026 CodSpeed Technology
Home Terms Privacy Docs