-
Notifications
You must be signed in to change notification settings - Fork 87
Closed
Labels
Impact: LowSeverity: MinorV14 onlyIssue is only valid for Vaadin 14Issue is only valid for Vaadin 14bugSomething isn't workingSomething isn't workingperformancevaadin-grid
Description
If the grid's items
is assigned with a small array, and then right after reassigned with a large one, you end up with more physical row elements than usually. This can have a negative impact on performance.
A regression from: vaadin/vaadin-grid#2131
Discovered in: vaadin/vaadin-grid-pro#161
A self-contained test-case:
it('should not create excess rows when items is reassigned', () => {
grid = fixtureSync(`
<vaadin-grid>
<vaadin-grid-column path="name"></vaadin-grid-column>>
</vaadin-grid>
`);
grid.items = [{ name: 'item-0' }];
flushGrid(grid);
grid.items = Array.from(new Array(100)).map((_, idx) => {
return { name: `item-${idx}` };
});
expect(grid.$.items.childElementCount).to.be.below(26);
});
Metadata
Metadata
Assignees
Labels
Impact: LowSeverity: MinorV14 onlyIssue is only valid for Vaadin 14Issue is only valid for Vaadin 14bugSomething isn't workingSomething isn't workingperformancevaadin-grid