Skip to content

[Perf] vue2 project upgrade to [email protected]. the compilation time has increased by more than twice #10339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ngd-b opened this issue May 12, 2025 · 12 comments

Comments

@ngd-b
Copy link

ngd-b commented May 12, 2025

When I upgrade my vue2 project with vue-cli. I used [email protected] version. the compilation time has increased by more than twice.

Before the upgrade. then compilation time was 1m20s.
After the upgrade. the compilation time was 3m30s. the time has increased by more than twice

I used node profiling to viewing the timing order. there was black time in the middle for two minutes.and I knew the execution consumption on the rust side during the black time.

I don't know how I should adjust my configuration to complie faster.

This is my node profiling file.

CPU.20250512.124052.58700.0.001.cpuprofile

thanks!

@chenjiahan
Copy link
Member

More context here: web-infra-dev/rsbuild#5217 (reply in thread)

@chenjiahan chenjiahan changed the title perf: vue2 project upgrade to [email protected]. the compliation time has increased by more than twice [Perf] vue2 project upgrade to [email protected]. the compliation time has increased by more than twice May 13, 2025
@jerrykingxyz
Copy link
Contributor

@ngd-b Could you try open trace.json on ui.perfetto.dev and upload an image with the parts that are obviously taking long time?

@chenjiahan
Copy link
Member

@ngd-b btw, you can use RSPACK_PROFILE= OVERVIEW instead of RSPACK_PROFILE=ALL rspack build to generate a smaller trace.json.

@ngd-b
Copy link
Author

ngd-b commented May 14, 2025

@chenjiahan @jerrykingxyz Ok. I might provide it a letter late.

@ngd-b
Copy link
Author

ngd-b commented May 14, 2025

@chenjiahan @jerrykingxyz Ok. I might provide it a letter late.

Sorry for replying so late.Is that okay? if you need more. let me know.

Image

@hardfist
Copy link
Contributor

@ngd-b can you share the trace file

@ngd-b
Copy link
Author

ngd-b commented May 15, 2025

@ngd-b can you share the trace file

Ok. This is the compressed file.

trace.json.zip

@hardfist
Copy link
Contributor

hardfist commented May 15, 2025

@ngd-b it seems a performance bug of remove_available_modules, try to disable parallelCodeSplitting to workaround it

experiments:{
   parallelCodeSplitting:false
}

Image

@hardfist
Copy link
Contributor

@ngd-b can you also replace your rspack version with @rspack-canary/[email protected](wit your original config) and generate a samply profile for us to further investigate the performance problem by following this guide https://rspack.dev/contribute/development/profiling#samply

@ngd-b
Copy link
Author

ngd-b commented May 15, 2025

@ngd-b it seems a performance bug of remove_available_modules, try to disable parallelCodeSplitting to workaround it

experiments:{
   parallelCodeSplitting:false
}

Image

That's good. After disabled it. the compilation time has become faster.

@hardfist
Copy link
Contributor

glad it helps, since it's a performance bug, we will fix it ASAP

@ngd-b ngd-b changed the title [Perf] vue2 project upgrade to [email protected]. the compliation time has increased by more than twice [Perf] vue2 project upgrade to [email protected]. the compilation time has increased by more than twice May 15, 2025
@ngd-b
Copy link
Author

ngd-b commented May 15, 2025

@ngd-b can you also replace your rspack version with @rspack-canary/[email protected](wit your original config) and generate a samply profile for us to further investigate the performance problem by following this guide https://rspack.dev/contribute/development/profiling#samply

Since I using rsbuild to build. How can I modify the version of rspack

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

No branches or pull requests

4 participants