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

dig "trace" mode #346

Open
sywhang opened this issue Jul 27, 2022 · 2 comments
Open

dig "trace" mode #346

sywhang opened this issue Jul 27, 2022 · 2 comments

Comments

@sywhang
Copy link
Contributor

sywhang commented Jul 27, 2022

Currently, we don't get any visibility into the types injected in the DI container of Dig. i.e. it's not really possible to see which constructors' provided types are the "most used" and where the "hot path"s are. Note that what I mean by "hot path" here isn't code that's executed frequently - each constructor in Dig is invoked precisely once. The "hot path" here is the constructor where the most of the graph depends on.

Also this may be useful for identifying types that are provided but aren't really used anywhere, which may help users identify some dead code, or break down constructors that aren't used frequently, etc.

@byene0923
Copy link

what's difference of "trace" mod and Visualize function which can generates a DOT file used for graphviz

@byene0923
Copy link

i think the result of Visualize function now is not elegant and clear, i think it could be designed as you mentioned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants