broccoli-viz icon indicating copy to clipboard operation
broccoli-viz copied to clipboard

Filter out 0ms nodes

Open matthewconstantine opened this issue 9 years ago • 8 comments

Is there a way to filter out nodes that report 0ms?

I'd like to get to the bottom of our build time issues and broccoli-viz is incredibly helpful. However the output is cluttered with hundreds of 0ms nodes that aren't contributing to the problem. They're mostly Addon#treeFor. Is there a straightforward way to remove those without affecting the integrity of the visualization?

matthewconstantine avatar Jan 26 '17 00:01 matthewconstantine

@matthewconstantine there is not at the moment but that's a great suggestion.

If you want to explore on the command line one possibility is to use https://github.com/heimdalljs/heimdalljs-graph. Please note that it is quite rough and not as stable as broccoli-viz.

But it will let you iterate over the graph (and then iterate over each stat for the nodes) so you can write your own queries. You will soon discover that there's lots of improvements to be made there.

As for broccoli-viz, ignoring nodes based on a selftime or totaltime threshold seems 👍 but there is no such feature at the moment.

hjdivad avatar Jan 26 '17 01:01 hjdivad

@matthewconstantine An alternative which might also help is to colour the nodes based on totaltime (or selftime) % of total build in such a way that the significant nodes jump out visually much more

hjdivad avatar Jan 26 '17 01:01 hjdivad

@hjdivad Great suggestions. I just gave heimdalis-graph a spin using heimdallGraph.loadFromFile('graph.0.json');. But it looks like it's not yet working for broccoli-viz json files. I saw a todo for it though. Is there an alternative way of ingesting the graph?

matthewconstantine avatar Jan 26 '17 01:01 matthewconstantine

@mattewconstantine I thought I had fixed that this morning. graph.0.json should be an even older format. What version of ember-cli are you on?

hjdivad avatar Jan 26 '17 01:01 hjdivad

ember-cli is on 2.4.3, and ember is 2.4.5. Since this is a massive project, upgrading is a big effort. Are there specific packages I can upgrade in isolation to get this going?

matthewconstantine avatar Jan 26 '17 02:01 matthewconstantine

@matthewconstantine no but let me remind myself of the format from that version to see how much effort a conversion would be

hjdivad avatar Jan 26 '17 02:01 hjdivad

basically have to convert stuff like https://gist.github.com/hjdivad/c751357d9506a6f638268b3075982739 into https://gist.github.com/hjdivad/8621b421fbcd383d19c0dcc03fff85ad

only nodes is read; the summary piece exists for other tools and/or humans.

hjdivad avatar Jan 26 '17 02:01 hjdivad

Ah perfect. All I needed to do was replace "subtrees" with "children" and heimdallGraph.loadFromFile worked fine. Thanks for the help!

matthewconstantine avatar Jan 26 '17 20:01 matthewconstantine