Ticket #2 (closed defect: wontfix)

Opened 3 years ago

Last modified 14 months ago

Scrolling enters an infinite loop

Reported by: kevin.conaway@… Owned by: tsuckow
Priority: major Milestone:
Component: grid view Version:
Keywords: Cc:

Description

We're having a problem where scrolling through the LiveGrid? causes it to enter an infinite loop where it keeps requesting data from the store.

The problem seems to be that the rowIndex doesn't get updated to be within the predicited buffer offset. I added some logging to illustrate the issue:

onLiveScroll: Scrolled and set rowIndex: 0
onLiveScroll: Scrolled and set rowIndex: 1 updateLiveRows -> isInRange: 1 >= 0 && 20 <= 19
updateLiveRows: lastIndex was 0
updateLiveRows: new index 1
updateLiveRows -> isInRange: 1 >= 0 && 20 <= 19

updateLiveRows: 1 not inRange: false forceReload == false: undefined updateLiveRows -> getPredictedBufferIndex: Calculating index+visibleRows / bufferSize/2 (1 + 20) - 10
updateLiveRows: Predicted bufferOffset: 11

// Store gets loaded

loadRecords: Set bufferRange to [11,30]
liveBufferUpdate -> isInRange 1 >= 11 && 20 <= 30

At this point, updateLiveRows is called and the whole process repeats itself indefinitely. The problem appears to be that the predicted buffer offset is always "predicted" to be ahead of the rowIndex but the rowIndex is never updated.

The GridPanel? has a height of 530px, a bufferSize of 20, and nearLimit of 1.

If I change the height from 530px to 200px, the scrolling seems to work OK.

Change History

Changed 3 years ago by tsuckow

  • status changed from new to accepted

Changed 3 years ago by tsuckow

  • status changed from accepted to closed
  • resolution set to wontfix

Don't be too spare with the bufferSize. As mentioned, the bufferSize needs to be larger than the amount of displayable rows in the grid.
Please set this value to a higher value - the reason why the component does not determine a bufferSize in case it detects problems is that I didn't want it to interfere with performant critical settings which should only be given by the end user.

Changed 3 years ago by kevin.conaway@…

Fair enough, increasing the bufferSize did work.

However, I think it would still be preferable to run in a manner that is non performant vs an infinite loop

Note: See TracTickets for help on using tickets.