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

Add Tabulator in the Data Grid Performance Comparison #3662

Closed
nclemeur opened this issue Mar 16, 2022 · 14 comments
Closed

Add Tabulator in the Data Grid Performance Comparison #3662

nclemeur opened this issue Mar 16, 2022 · 14 comments
Labels
Suggested Feature A suggested feature that is waiting review

Comments

@nclemeur
Copy link

I think it would great to see how tabulator is comparing against the other grid libraries. For example this article is comparing bryntum grid to other grid solution.

So I have forked their github repo and added a test for tabulator. You can find it here.

Could anyone from the team review the code in the tabulator folder to make sure I haven't missed anything?

My first results suggests that tabulator is quite performant for the unlocked case, but there is really a big performance hit when using the locked columns module (mostly for the initial rendering which goes from about 50ms to about 2200ms on my computer).

@nclemeur nclemeur added the Suggested Feature A suggested feature that is waiting review label Mar 16, 2022
@olifolkerd
Copy link
Owner

olifolkerd commented Mar 16, 2022

Hey @nclemeur

That is a great idea, i would love to see that in there, i will take a look at the code this weekend and give you a shout.

What were the values from your test?

As for your initial results, if by "locked" you are referring to frozen columns, they yes Tabulator is very inefficient there, especially since the 5.0 rebuild as the frozen columns module hasn't been fully migrated to the new internal event structure yet.

It is part of my plan for the 5.2 release to have a rebuild of that module as there are many inefficiencies that can be improved upon.

Cheers

Oli :)

@nclemeur
Copy link
Author

Yes, locked is the equivalent of frozen in tabulator world. Maybe it's worth waiting for 5.2 before asking to integrate tabulator in the tests suite. Anyway, I'll wait for your feedback.

@olifolkerd
Copy link
Owner

olifolkerd commented Mar 16, 2022

Having had a brief look at your code, there is a couple of efficiency savings that could be done here.

Rather than calling setData in the tableBuilt event, you should pass the data array into the data prop on the table constructor, then the table will be initialized with the data, rather than rendering an empty table then loading the data.

You also then shouldnt need to use the blockRedraw and restoreRedraw function (you should never need to use these for a standard setData call, it will manage this for you, they are more intended for when you are manually doing lots of complex actions)

@nclemeur
Copy link
Author

I used the setData so that I have a callback to know when tabulator has finished the updated and then stop the timer. Maybe I can use the data prop and then use the tableBuilt to stop the timer (assuming that's the right event to know when tabulator is done). I'll try that tomorrow.
Thank you for the info about the block/restore functions.

@olifolkerd
Copy link
Owner

yes, i can see why you did that, which is valid. if you went for the data prop then you would need to listen to the dataProcessed event.

see which approach is faster, i would love to know the results.

@nclemeur
Copy link
Author

nclemeur commented Mar 17, 2022

I did try the approach with the data as a prop and it was slightly faster, but the difference were not huge. By curiosity I ran the tests for ag-grid and extjs-classic on my computer,and got the following results:
image

So unlocked version is really extremely good, but the locked (frozen) is extremely bad too (at least for the initial rendering)...

@olifolkerd
Copy link
Owner

Very interesting numbers. Great to hear it outperforms ag grid on the standard render!

Hold off untill after the 5.2 launch and the frozen column score should be much better.

I'm aiming to have 5.2 released by mid April

Cheers

Oli :)

@nclemeur
Copy link
Author

For completeness I should probably add a link to the original article

@olifolkerd
Copy link
Owner

Hey @nclemeur

I have just pushed some updates to the 5.2 branch to address some of the frozen columns efficiency issues.

They will be included in the 5.2 release later this month.

Cheers

Oli :)

@olifolkerd
Copy link
Owner

Hey @nclemeur

Version 5.2 has just been released. Any chance you could run your benchmarks again and see how we get on?

Cheers

Oli :)

@nclemeur
Copy link
Author

Hello,

I have just ran the tests with 5.2 and indeed what an improvment for locked/frozen columns. Please see table below
image

@olifolkerd
Copy link
Owner

Awesome news. Would you be ok to add these values to the comparison repo?

@nclemeur
Copy link
Author

I have created a PR to integrate into the main repo (see bryntum/grid-performance#3), but I don't have access to the same computer as the one they ran their test suites. So my numbers would not be really comparable. Hopefully they'll do it when they integrate that PR...

@olifolkerd
Copy link
Owner

Hey @nclemeur

Turns out the bable transpilation was slowing down the UMD versions of Tabulator hugely, If you were running the tests against the tabulator.min.js file then it may be worth running them again on the latest release, it is about 8 times faster at loading data.

I have also completely rebuilt the frozen columns module so it is based on sticky positioning so it is much more performant too.

Cheers

Oli :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggested Feature A suggested feature that is waiting review
Projects
None yet
Development

No branches or pull requests

2 participants