-
Notifications
You must be signed in to change notification settings - Fork 135
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
Version 0.2 Release Candidate #42
Conversation
Also use Tornado for templating.
So far: Right now it'll make a visualization with highlighting and a tooltip, but no zooming. snakeviz.js: - function for finding the root of the function call stack - function for building a JSON tree for use with D3's partition - still needs to handle recursion
Problems: - Sizes are wrong. This is because I'm calculating the size based on the total cumulative time for a function, not the cumulative time below a given function. - Need to remove directories from file names.
There are times when children have calculated sizes larger than their parent (because with the profiling information we have it is hard to untangle just how much cumulative time of a program was spent in a given tree). When this happens I don't do anything fancy, only normalize the children's sizes so they exactly fit within the parent.
- Internal-time children larger than their parents - Random floating arcs - Tool-tip text overflowing the tooltip brackground
Call stack does not update when open and user clicks on vis.
Instead of having a tooltip displaying function information, have a div of info on the left side showing stuff. Gives more room to display info.
@tonysyu: Thanks for the link, I'll check that out. @kburns: Would it be possible to share one of your huge profiles with me by email? It seems like nothing I have on hand is stressing this out enough. I'm jiffyclub@gmail.com. Thanks! |
Sure thing |
I was calculating child sizes before recuring into the callstack, but only normalizing them afterwards. That means that children could be added to children with grossly wrong sizes and they would blow up their parents' display sizes. So now I calculate and normalize all child sizes before recursing further into the call stack so that no part of the tree can be larger than its parent.
That was a quick turnaround! This is a great v2 release 👍 |
Building some call trees for the JSON worker can take a while and it leaves the page unresponsive while the user could be browsing the stats table or changing parameters. Moving that processing to a Worker allows the page to stay responsive so that users can change visualization parameters or browse the stats table.
Spinner is visible whie the app is building a call tree and rendering the SVG.
The fraction of time spent in a child of a function is compared to the cutoff and if it is less than the cutoff the child is added to the call tree but none of its children are. The default threshold is 1 / 1000, with options for 1 / 100 and no cutoff.
Currently the worker can fail when the call tree it tries to send back is so large that it can't be serialized to a JSON string. Now the app shows an error message with some advice when that happens.
@kburns, thanks for sending over the profile, that was really helpful. You've got what you might call a "wide" profile, with a lot of calls off of the root of the call tree. That leads to a large call tree even when depth-limited, and that was bogging down the app. I've added some features for mitigating this situation:
Now your profile renders for me in a few seconds and I can speed things up by decreasing the depth and increasing the cutoff. Thanks again for providing that use case! |
Also make the background white so it covers the visualization.
Thank you! The new version is working great for me! |
This is a pretty big rewrite of SnakeViz mostly with the goal of improving performance. I've thrown a large and detailed profile at this version and it seems to work just fine, so I'm hoping this will be eliminate the performance issues we all had with version 0.1. Please take this for a spin and leave any feedback here.
The big, high level changes are:
Other, smaller changes include:
Screenshot of the new stuff in action:
The call stack collapses so it won't always cover the sunburst.