-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Sunburst chart #25
Sunburst chart #25
Conversation
The Yarn lockfile changes were created by v0.17.9 of `yarn` after adding the `d3` package as a dependency with `yarn add d3`
The idea of this tip is courtesy of http://stackoverflow.com/a/9539361/1152564
The lockfile changes were received by yarn version 0.17.9
Hiya! I know this PR is quite a big change compared to what there was before. Would you be interested if I'd look into some sort of plugin system that would work with this code base easily? Or should I rather create a sibling project with this sunburst functionality? I'd be happy to try to reduce the footprint this feature has in the codebase and help my best with tackling issues possibly raised in the future because of this. And if I'd ever become disengaged and no-one else wants to step up for maintaining this feature, I would aim for this to be easily removed. I value any comment about this, even if it's a rejection to this whole idea 😄. I'd be happy to chat about the future of webpack-bundle-analyzer, as bundle sizes and comprehensible visualizations about performance problems are close to my heart. |
@valscion Thanks for PR! As you mentioned there is an amaizing
Adding second type of chart to this analyzer will significantly increase it's complexity adding IMHO rather questionable benefits. Why wouldn't you just use |
Thanks for replying!
I think so too, treemaps are faster and easier to read. Sunburst charts that zoom are easier for me to browse, though, if I want to dig deeper into some large-ish modules.
That is also the reason why I don't use
I don't actually think that this is a choice between treemaps or sunburst charts. I like treemaps for seeing the larger picture, but sometimes I'd like to see a nice sunburst chart to allow for different kind of visualization. I figured that sunburst charts could help me discover something that cannot be as easily seen from a treemap. I also think that sunbrust charts are easier to browse and dig deeper than treemaps, as e.g. sunburst charts don't require you to scroll your window but it keeps its position and size.
Yeah, I'm not sure either whether this is worth the increased complexity. That is why I have been thinking whether there could be another approach to make this work. What I'd need for sunburst charts would be the same stats output that this plugin provides on the webpack side. I was wondering whether the webpack plugin could be modified somehow so that its output could be used in a totally different UI as well? Or that the UI that is opened could be configurable, so that I could build a totally separate npm package that would only contain the UI parts that could be plugged into this packages webpack parts. I haven't yet formed any concrete plans, but I can think about what this "separation of webpack plugin and UI" would mean code-wise if you think that there could be some benefits to reap. It might even make the current code easier to reason about, as there probably would be an even more clear distinction between the current UI and the webpack plugin than there is right now. Or it could be that the current situation is the best approach and any changes to it would make the code more difficult to understand 😅 This PR was meant to be just a conversation starter about future directions, and I wanted to see what all the possibilities of this plugin are. I was very excited to learn that the JSON output of bundles is so powerful in this plugin that there is likely multitude of different things that JSON could be used for, sunburst chart being only one of them. If we could make the JSON data more easily consumable and pluggable, people could come up with wild ideas from CLI commands to very app-specific visualizations. I think that this project has a big potential in allowing such experiments 😄 |
And funnily enough, chrisbateman/webpack-visualizer#13 even says that this project has access to more info and should probably be used instead 😄 |
That's a very interesting idea and, at first glance, it won't be too hard to split analyzer from report UI. We can move all current UI code from And the nice thing is reporter is not limited to some UI stuff - it can do anything it want with provided data! @valscion Does it makes sense? |
Yes! That is exactly what I envisioned the best solution could look like! I might have some free time during the christmas holidays to look into this, so unless your fingers are itching to take a stab at this, I'll happily devote some time to dig deeper into this library and come up with some sort of an action plan to tackle the separation. I'm also fine by it if you want to do it all by yourself, but I suppose more happy code monkeys helping with open source isn't a bad thing? 😄 🐒 I think it might make more sense to start a new bigger issue for this whole separation thing to keep track of the process, and to provide an easier place for discussing related changes to this. We can close this PR in the mean time, I'll keep my branch around so that I can refit this visualization for the new architecture. |
Great! Go ahead, man! 😉
Agree. Could you create it? |
Related, I added sunburst support as well (I didn't know @valscion's PR existed). @th0r, you built a great tool and we plan to use it as a basis for Dojo 2 build reporting. We were concerned about shipping the Carrot Search commercial treemap solution to users with permanent demo branding, hence our fork. |
@bitpshr Nice! So, after splitting analyzer and reporter you'll be able to extract it into separate reporter package and just plug it to analyzer. |
Wow, @bitpshr that is cool! And much prettier than what I had hacked together, but oh well, mine was just a proof of concept and a conversation starter 😄 Great to see there's more interest for #32! I'd value your input once I get something going on regarding the splitting, so make sure to subscribe to that issue if you'd like your voice to be heard 😉 |
Hi there!
I wanted to see if I could get a sunburst chart out of my dependencies, and after hacking on this for a while I've got a proof of concept working.
I drew my inspiration from the great work by @chrisbateman in https://github.com/chrisbateman/webpack-visualizer and I owe him for the amazing tool that
webpack-visualizer
is.Note that this is still a proof of concept. Should you be interested in having this feature available built-in for
webpack-bundle-analyzer
, this will require some tweaks:statSize
webpack-visualizer
does)What do you think? Would this be something you'd be interested to accept if I'd keep on working on this?