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

perf: faster datatree render performance #4337

Merged
merged 4 commits into from
Mar 17, 2024

Conversation

lukecotter
Copy link
Contributor

@lukecotter lukecotter commented Nov 23, 2023

2X faster datatree render performance

I tested these changes with a tree with 251890 nodes that can be expanded. I takes ~2.5 seconds to apply one of my filters with these changes and all nodes full expanded.
Before the changes it was ~6.5 seconds with the same data.

Before
The filter seems to take much longer when the chrome profiler is running, the timing I stated above are more accurate when the profiler is not running
image

After
image

resolves #4336

This prevents dom being destroyed and created repeatedly,
It is most beneficial withe a deeply nested tree.
looping the array and push to the existing array is much faster
than using concat and assign.
I believe this is because concat creates a new array
each time it is called.
@lukecotter lukecotter changed the title feat: datatree performance feat: faster datatree render performance Feb 21, 2024
@lukecotter lukecotter changed the title feat: faster datatree render performance perf: faster datatree render performance Feb 21, 2024
@olifolkerd
Copy link
Owner

Hey @lukecotter

Thanks for the PR, great work there!

I will merge this in to the 6.0 branch now and include it in todays release.

Cheers

Oli :)

@olifolkerd olifolkerd changed the base branch from master to 6.0 March 17, 2024 09:47
@olifolkerd olifolkerd merged commit 29f34dc into olifolkerd:6.0 Mar 17, 2024
2 of 3 checks passed
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.

Datatree performance improvement
2 participants