Skip to content
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

chore: fix typescript performance #3030

Merged
merged 2 commits into from
Mar 19, 2023

Conversation

sheremet-va
Copy link
Member

I noticed we have a poor TS performance in the repo for quite some time now. I decided to check the performance on PC with 64GB, and it took a few seconds to update autocomplete 👀

tsc --generateTrace showed that deepMerge takes a lot of time to process in the pools/child.ts file:

image

Now it's a lot better:

image

We don't really use the deepMerge type merging, so I decided to just remove it.

@sheremet-va sheremet-va requested a review from antfu March 18, 2023 23:42
@AriPerkkio
Copy link
Member

Great finding! I've also noticed that sometimes the IDE intellisense takes a while and can even stop working on a 16GB RAM. Restaring VSCode's Typescript server has restored the intellisense. Hopefully this fixes it.

@sheremet-va sheremet-va merged commit 13005b3 into vitest-dev:main Mar 19, 2023
@sheremet-va sheremet-va deleted the fix/ts-performance branch March 19, 2023 09:02
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.

2 participants