Skip to content

Commit

Permalink
fix: stats perf degradation in hmr (#7407)
Browse files Browse the repository at this point in the history
fix: unused to json call
  • Loading branch information
SyMind authored Aug 1, 2024
1 parent fa2cb3e commit 6a924fc
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/rspack/src/Stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,8 @@ export class Stats {
// Modern.js: https://github.com/web-infra-dev/modern.js/blob/63f916f882f7d16096949e264e119218c0ab8d7d/packages/server/server/src/dev-tools/dev-middleware/socketServer.ts#L172
let stats: StatsCompilation | null = null;
try {
const statsCompilation = this.#inner.toJson(options);
stats = statsFactory.create("compilation", this.compilation, {
compilation: this.compilation,
statsCompilation,
getStatsCompilation: (
compilation: Compilation
): binding.JsStatsCompilation => {
Expand Down

2 comments on commit 6a924fc

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-08-01 2f6696e) Current Change
10000_development-mode + exec 2.24 s ± 26 ms 2.25 s ± 29 ms +0.46 %
10000_development-mode_hmr + exec 699 ms ± 9.2 ms 718 ms ± 3.4 ms +2.69 %
10000_production-mode + exec 2.79 s ± 22 ms 2.81 s ± 48 ms +0.98 %
arco-pro_development-mode + exec 1.9 s ± 77 ms 1.91 s ± 75 ms +0.16 %
arco-pro_development-mode_hmr + exec 432 ms ± 3 ms 433 ms ± 4.7 ms +0.30 %
arco-pro_production-mode + exec 3.39 s ± 64 ms 3.4 s ± 89 ms +0.05 %
threejs_development-mode_10x + exec 1.77 s ± 19 ms 1.71 s ± 16 ms -3.32 %
threejs_development-mode_10x_hmr + exec 878 ms ± 10 ms 837 ms ± 9.4 ms -4.69 %
threejs_production-mode_10x + exec 5.49 s ± 37 ms 5.48 s ± 29 ms -0.24 %

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
_selftest ✅ success
nx ❌ failure
rspress ✅ success
rsbuild ❌ failure
examples ✅ success

Please sign in to comment.