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

Improve performances while getting Item properties in CustomTable.parseItemIdToCells #109

Closed
andrealuciano71 opened this issue Apr 18, 2016 · 1 comment

Comments

@andrealuciano71
Copy link

andrealuciano71 commented Apr 18, 2016

Hi, I was testing performances of Filtering Table (filteringtable-0.9.15.v7) in combination with the Vaadin JPA Container.
I know JPA Container is not a good choice, but this test helped me to find a possible improvement in the add-on's code.
In CustomTable.java method parseItemIdToCells at line 2276, there is a loop on columns which calls getContainerProperty a lot of times:

for (int j = 0; j < cols; j++) {
...
  p = getContainerProperty(id, colids[j]);
...

This performs very badly with JPA Container, even if the Entity cached provider is employed.

Instead, if the enity item is gotten before the loop such as in the following example, then the performances are up to 300% better in my test:

Item item=getItem(id);
for (int j = 0; j < cols; j++) {
...
  // p = getContainerProperty(id, colids[j]);
  p = item.getItemProperty(colids[j]);
...

Regards,
Source.zip

Andrea

@andrealuciano71 andrealuciano71 changed the title Improve performances in Improve performances while getting Item properties in CustomTable.parseItemIdToCells Apr 18, 2016
andrealuciano71 added a commit to andrealuciano71/FilteringTable that referenced this issue Apr 19, 2016
@tepi
Copy link
Owner

tepi commented Jan 25, 2019

Not relevant anymore. The CustomTable class is no longer used.

@tepi tepi closed this as completed Jan 25, 2019
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

2 participants