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

Feature: Program Construction #2

Open
amcasey opened this issue Jan 13, 2022 · 3 comments
Open

Feature: Program Construction #2

amcasey opened this issue Jan 13, 2022 · 3 comments

Comments

@amcasey
Copy link
Member

amcasey commented Jan 13, 2022

We can already detect and report program building hot-paths (chiefly in findSourceFile), but the output is confusing. We would need to identify imports with high self time and then report causal chains for those.

@amcasey
Copy link
Member Author

amcasey commented Jan 25, 2022

The concept of causal chains is less straightforward than it seems because the trace really indicates the first reason that a file was included - eliminating that reason may not prevent the file from being loaded for some other reason.

@amcasey
Copy link
Member Author

amcasey commented Jan 25, 2022

Another possibly interesting heuristic would be to look for events with high fanout (e.g. barrel module), but this goes against the grain of the tool, which tries to drop the many inexpensive children. It seems like it would need to happen before that pruning, perhaps by persisting an "original child count".

@amcasey
Copy link
Member Author

amcasey commented Jan 25, 2022

Another thing to look for is npm_modules that are included from more than one path - having two versions of the same package tends to slow down checking a lot because so many structural comparisons of similar types are required.

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

No branches or pull requests

1 participant