Skip to content
Permalink
Browse files

Cut down the initial row pool by half (optimize first render)

  • Loading branch information
tomivirkki committed Nov 15, 2019
1 parent 6685421 commit 850f3afdb71cf83667508f15ef5044d6439d32e7
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/vaadin-grid-scroller.html
  2. +3 −3 test/physical-count.html
@@ -175,7 +175,7 @@
if (!this._initialPoolCreated) {
this._initialPoolCreated = true;
super._increasePoolIfNeeded(25);
super._increasePoolIfNeeded(12);
} else if (this._optPhysicalSize !== Infinity) {
this._debounceIncreasePool = Polymer.Debouncer.debounce(
this._debounceIncreasePool,
@@ -85,13 +85,13 @@
grid.style.display = 'none';
expect(grid._physicalItems.length).to.eql(25);
expect(grid._physicalItems.length).to.eql(12);
grid.style.display = '';
grid._resizeHandler();
flushGrid(grid);
expect(grid._physicalItems.length).to.be.above(25);
expect(grid._physicalItems.length).to.be.above(12);
});
it('pool should not increase if the scroller has no size', () => {
@@ -106,7 +106,7 @@
grid._update();
grid._increasePoolIfNeeded();
expect(grid._physicalCount).to.equal(25);
expect(grid._physicalCount).to.equal(12);
});
it('should minimize physical count', () => {

0 comments on commit 850f3af

Please sign in to comment.
You can’t perform that action at this time.