Fix same node columns with different parents #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.