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

Grid performance with lots of columns #6177

Closed
vaadin-bot opened this issue Jan 22, 2015 · 7 comments
Closed

Grid performance with lots of columns #6177

vaadin-bot opened this issue Jan 22, 2015 · 7 comments

Comments

@vaadin-bot
Copy link
Collaborator

Originally by fschmitt


I used the Grid component to build a tabular with lots of columns, where columns represent days in a date interval. Additionally I grouped header columns to represent calendar weeks per year and months.
Sadly I noticed, that the initial loading performance is not really satisfying.
I simulated my implementation and will attach it to this ticket.


Imported from https://dev.vaadin.com/ issue #16474

@vaadin-bot
Copy link
Collaborator Author

Originally by fschmitt


Attachment added: BigGridTest.java (1.7 KiB)
Test implementation

@vaadin-bot
Copy link
Collaborator Author

Originally by fschmitt


With my setting its around 5 seconds until I can see the grid and another 5 seconds until the grid is correctly rendered

@vaadin-bot
Copy link
Collaborator Author

Originally by @jdahlstrom


Hi, thanks for the report. The client-side Grid does currently a lot of unnecessary work when adding multiple columns at a time (including during the initialization phase), and we're in process of optimizing the process. There are a couple of low-hanging fruits that should improve the performance quite a bit.

I should mention, though, that Grid is not especially designed for the case of lots of columns; the lack of column lazy loading in particular will be an issue as the number of columns grows.

@vaadin-bot
Copy link
Collaborator Author

Originally by @wolfie


Initial benchmarks on my Retina Macbook Pro (OSX 10.10.1, Chrome 41.0.2272.16 beta (64-bit)) tells me that your provided example application spends 2.2 seconds in the Grid.onStateChange method (note: this doesn't account for everything makes Grid slow in your example), out of which roughly 2s was simply adding those 60 columns.

I have some initial enhancements that gets both of those times to 1.3s. I've identified another place that currently takes about 3.5s to run. If I'm lucky, I'll have the time to optimize this down to about 50% or so. It's in a hairy part of the code, so I'm not keeping my hopes up too high... I'll report back once I have something.

@vaadin-bot
Copy link
Collaborator Author

Originally by @wolfie


I found a way to reduce overhead "a bit" when setting widths for multiple columns, getting the 3500ms down to 200ms on the 60 columns. I'll check the test results on how badly that might break the surrounding stuff...

So, from 6s on my machine, we're now down to about 1.5s. Once all tests pass, I think this will be enough for now, as getting it down further than this would require considerable changes to the architecture in general.

@vaadin-bot
Copy link
Collaborator Author

Originally by fschmitt


Wow, thanks for the effort, that sounds promising! You think these changes will make it into 7.4 beta3?

@vaadin-bot
Copy link
Collaborator Author

Originally by @wolfie


The patch is still in review (https://dev.vaadin.com/review/#/c/7072/), and beta3 is being built as we speak (i think), so I'm thinking "no", unfortunately. But it will most probably be in RC1.

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

No branches or pull requests

1 participant