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

Report on actionable emit hotspots #15

Merged
merged 5 commits into from
Jan 24, 2022
Merged

Conversation

amcasey
Copy link
Member

@amcasey amcasey commented Jan 24, 2022

After looking at lots of traces it appears that JS emit is nearly always proportional (with a small constant) to file size (even with down-levelling), so flagging JS files that took a long time to emit rarely does anything beyond identifying large input files.

Declaration emit, on the other hand, is much less directly related to input size. So far, the most important factor we've found for disproportionately slow declaration emit is the presence of a lot of import expressions in the output. This PR attempts to flag such instances by searching slow-to-emit declaration files (if present) for import expressions.

Fixes #3 (until we find some other cause of disproportionate slowdown).

@amcasey
Copy link
Member Author

amcasey commented Jan 24, 2022

If this functionality helps you, please upvote microsoft/TypeScript#44044 and, if possible, provide a repro.

@amcasey amcasey merged commit da8d107 into microsoft:main Jan 24, 2022
@amcasey amcasey deleted the EmitHeuristic branch January 24, 2022 23:38
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.

Feature: Emit
1 participant