-
Notifications
You must be signed in to change notification settings - Fork 12.8k
[nightly][performance] 97% of time spent reading type dependencies when --noCheck and --isolatedDeclarations is enabled #58863
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
Comments
Well, it's Maybe That and it won't do the right thing in the editor; parsing/binding is not lazy so if you do set |
I don't think I even have a mental model around how |
Doing better here would of course be nice, just needs some thinking! For code that passes |
We already have option |
Nice! Having
|
Yeah, you can't really avoid loading lib; transpileModule/transpileDeclaration simulate those basic things just to make things work for that reason, but that doesn't apply to regular runs. |
Hm, maybe we should actually be pulling that mini-lib.d.ts into the core compiler and using that when noLib is set? There are types (those above) that are needed for things to work at all, so maybe that would actually be a positive thing... |
Seems like I can add both |
IIRC those are already set by |
Interesting, I just saw our build time go from ~5m49s to ~5m33s with the updated config. I'm not complaining! Note that this is with a parallel builder, so the upper bound for the improvement is more like 16s * # of cores. |
The mini-lib is only sufficient for I feel like you can probably turn on |
Some more interesting findings:
|
@MichaelMitchell-at may be #58867 |
Closing this out since it's established that things are generally working as intended. Some productive discussion and ideas came out of this though! |
π Search Terms
noCheck isolatedDeclarations
π Version & Regression Information
--noCheck
to be commandLine optionΒ #58839 Thanks @sheetalkamat!β― Playground Link
No response
π» Code
π Actual behavior
Ran the above code using
tsc --generateTrace trace_dir
which produced the following trace.trace.json
If you load this trace into https://speedscope.app you can see that out of 271ms, about 97% of the time is spent parsing and binding
@types/lodash
andlib.d.ts
and only 6ms is spent on the actual emit.which seems superfluous and a huge optimization opportunity if we can skip these steps. cc @weswigham @jakebailey @dragomirtitian
π Expected behavior
No time is spent parsing and binding and emit takes up most of the time
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: