Skip to content

perf: cache new URL evaluate expression#19557

Merged
alexander-akait merged 1 commit intomainfrom
refactor-code
May 22, 2025
Merged

perf: cache new URL evaluate expression#19557
alexander-akait merged 1 commit intomainfrom
refactor-code

Conversation

@alexander-akait
Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

perf - cache new URL(), when we have export new URL("./test.txt", import.meta.url); we will call evaluteExpression three times, now we cache it

Did you add tests for your changes?

Existing

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

No

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 22, 2025

CodSpeed Performance Report

Merging #19557 will degrade performances by 15.24%

Comparing refactor-code (d87e859) with main (9bc07c6)

Summary

⚡ 4 improvements
❌ 1 regressions
✅ 128 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark "devtool-eval", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 35.7 ms 42.2 ms -15.24%
benchmark "devtool-eval-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 42.3 ms 10.2 ms ×4.1
benchmark "future-defaults", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 48.9 ms 11.8 ms ×4.2
benchmark "lodash", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 34.3 ms 30.9 ms +11.22%
benchmark "minimal", scenario '{"name":"mode-development","mode":"development"}' 30.3 ms 24 ms +26.32%

@alexander-akait alexander-akait merged commit c9e25e5 into main May 22, 2025
43 of 44 checks passed
@alexander-akait alexander-akait deleted the refactor-code branch May 22, 2025 17:43
3ru pushed a commit to 3ru/webpack that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant