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

Fix same node columns with different parents #25

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

thisduck
Copy link

@thisduck thisduck commented May 12, 2017

Hey @SamSaffron,

Opening a different pull request for this issue. I'll be merging it into #24 soon.

The case is when a node is wider than it's parent. This happens when both method1 and method2 call method3. If method1 is 3 samples and method2 is 2 samples, method3 appears as a node with 5 samples.

method3 should appear as two nodes, first with 3 samples and as a child of method1. And then with 2 samples and as a child of method2.

This PR fixes that scenario. I modified the tests and added a new one to cover a slightly different case.

I had originally fixed this in the javascript as part of #24, but for very large datasets (over 50MB) the javascript crashes because it has to modify the processed data. It's much faster to do on the ruby side. Creating a PR off of master to isolate the issue.

In the previous case, 4 is rendered as a child of 1. Except that 4 has a
width of 2 and 1 has a width of 1. The child shouldn't be wider than the
parent. The correct case is that there should be two nodes for 4 of
width 1 each. The first node is a child of 1 and the second one is a
child of 5.
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

Successfully merging this pull request may close these issues.

None yet

1 participant