-
Notifications
You must be signed in to change notification settings - Fork 109
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
[Feature Request] Reduce TS parsing/evaluation times #1481
Comments
This is not how I read your flame chart. Locating, reading and parsing source files to memory appears to be taking ~250ms. That's for all sources files used by that TS project, including loading the The If you look the details on these Also make sure you are using a recent version of TSC. They have been working hard recently on build-time performance.
On my local machine, Splitting If you still think this is an issue, would you mind providing more details on exactly how you measured this? And if possible, please include a sample repo so we know that we are measuring the same thing. |
Is your feature request related to a problem? Please describe.
We're profiling our TS monorepo and the
@temporalio
packages have popped up as a hot path. I've noticed a few issues that can probably be optimized:@temporalio/client
package takes 1 second. In the flame chart below, you'll notice that ourtemporalclient.ts
file, which imports@temporalio/client
takes most of the compilation time.This can maybe be optimized by removing barrel imports (giant index exports), and moving things into deep path imports. Additionally, this may be caused by #2.
@temporario/proto
TS declaration file is 49k lines long and is 2.67 MB in size. The generated file at@temporalio/proto/protos/root.d.ts
is massive and is most likely consuming most of the parsing/checking time.This can maybe be optimized by splitting
root.d.ts
into multiple files so they can be checked in parallel. Probably split intocoresdk.d.ts
,temporal.d.ts
,google.d.ts
,grpc.d.ts
, etc.Describe the solution you'd like
Improved TS compiler speeds. I listed some possible solutions above.
Additional context
This is using project references and was tested simply using
tsc --build
.The text was updated successfully, but these errors were encountered: