-
Notifications
You must be signed in to change notification settings - Fork 384
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
build: speedup tsc #5038
build: speedup tsc #5038
Conversation
trace after this patch:
for summary, after this patch there is no extremely slow path in type checking, just too much code and too many types to check |
This reverts commit 1a6b55f.
This PR is ready to merge wither #5039 is fixed or not |
Thanks for the investigation and the fix. That's really smart to combine the types like that to help out tsc. |
This is a (almost) type only change, it change the type of `TriggerSet` only. Our core file are using `LooseTriggerSet` and `LooseTrigger` so they are not affected. This patch make `trigger.type` required for all cactbot built-in net triggers and merge `BaseTrigger` and `PartialNetRegexTrigger` to help tsc narrow trigger type. about why merging types is explained here: #4508 (comment) ## result `npx tsc` 35s -> 20s `npx eslint .` 1m6.862s -> 40.713s `npm test` 38s -> 20s `npm run start` no improvement. --- I know the team of swc is trying to port tsc to rust, wish them good luck… cb8b96e
This is a (almost) type only change, it change the type of
TriggerSet
only. Our core file are usingLooseTriggerSet
andLooseTrigger
so they are not affected.This patch make
trigger.type
required for all cactbot built-in net triggers and mergeBaseTrigger
andPartialNetRegexTrigger
to help tsc narrow trigger type.about why merging types is explained here: #4508 (comment)
result
npx tsc
35s -> 20snpx eslint .
1m6.862s -> 40.713snpm test
38s -> 20snpm run start
no improvement.I know the team of swc is trying to port tsc to rust, wish them good luck…