Skip to content

Conversation

@sheremet-va
Copy link
Member

@sheremet-va sheremet-va commented Aug 29, 2025

Description

This PR combines worker.js and workers/* files together removing the need to have a dynamic import.
It also removes @vitest/utils entry point, everything has to be imported from @vitest/utils/* for better performance.
@vitest/utils/source-map performance was improved by inlining only used functions from @jridgewell/trace-mapping.
The tinyrainbow package was updated to v3 where I removed the check for isatty that took a few ms.

With these changes I managed to shave of ~6ms of startup time. The main bottleneck at this point is just the sheer amount of code that we import during the startup.

@sheremet-va sheremet-va changed the title perf: reduce the number of unneded imports perf: reduce the number of unused imports Aug 29, 2025
@netlify
Copy link

netlify bot commented Aug 29, 2025

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 09d9275
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/68beeb9f8b026d000888447c
😎 Deploy Preview https://deploy-preview-8508--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va sheremet-va marked this pull request as draft August 29, 2025 17:44
@sheremet-va sheremet-va marked this pull request as ready for review September 8, 2025 15:42
@sheremet-va sheremet-va merged commit 9a79b90 into vitest-dev:main Sep 8, 2025
12 of 14 checks passed
@sheremet-va sheremet-va deleted the perf/improve-imports branch September 8, 2025 17:20
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