ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Scrolling large data set of 1.000 rows, causes flickering

Open wendeldw opened this issue 12 years ago • 15 comments

Using release candidate 3.0.0-rc.12. The grid has drawing issues when using the scrollbar in combination with large data set.

ui-grid-canvas, has a small percentage of hidden rows. 5% top and 5% at the bottom, so the viewpoint is showing 90% of the rows. Is it possible to increase the size of the canvas? Say 80% hidden. This will probably solve my case.

wendeldw avatar Oct 09 '14 17:10 wendeldw

virtializationThreshold is the property you're looking for in gridOptions (refer line 300 of GridRenderContainer.js). I don't recall what this value is - I thought it might be a percentage (i.e. 0.2 for 20%), but not certain. This value needs to be documented in the ngdoc.

PaulL1 avatar Oct 11 '14 18:10 PaulL1

Actual I think excessRows is the one he wants. On Oct 11, 2014 1:15 PM, "Paul" [email protected] wrote:

virtializationThreshold is the property you're looking for in gridOptions (refer line 300 of GridRenderContainer.js). I don't recall what this value is - I thought it might be a percentage (i.e. 0.2 for 20%), but not certain. This value needs to be documented in the ngdoc.

— Reply to this email directly or view it on GitHub https://github.com/angular-ui/ng-grid/issues/1779#issuecomment-58758982.

c0bra avatar Oct 12 '14 14:10 c0bra

Could you give me a brief description of what virtualizationThreshold does (it's in options so I presume it's intended to be user tuneable), and maybe excessRows too, and I'll add them both into the documentation? Thanks,

PaulL1 avatar Oct 12 '14 17:10 PaulL1

I played a bit with scrollThrottle and excessRows. It didn't solve the problem.

The issue is clearly visible in http://ui-grid.info/docs/#/tutorial/402_GridIsScrolling Scroll fast up and down with the scrollbar.

It appears that for each row, the contents is being deleted and reinserted. Why not reuse the column cells, when scrolling?

wendeldw avatar Oct 20 '14 01:10 wendeldw

It is related to https://github.com/angular-ui/ng-grid/issues/1029

wendeldw avatar Oct 20 '14 01:10 wendeldw

There is work underway on reusing the column cells. There are issues with cellTemplates and headerTemplates, although I suspect those largely relate to horizontal scrolling. But I believe that there are some features that have difficulty also in reusing elements for vertical scrolling.

PaulL1 avatar Oct 20 '14 02:10 PaulL1

I don't think it would be a problem, otherwise provide an option to fallback in the current render implementation..

wendeldw avatar Oct 21 '14 12:10 wendeldw

Can this be tagged as bug.

The difference between the old ui-grid and the new implementation is huge.

Old (smooth at 200.000 lines lines with scrolling) http://plnkr.co/edit/8fuIJr

New (white screen at 200.000 lines with scrolling) http://plnkr.co/edit/Kwz1SQJBrPubIMxl1VaP

Hopefully it is not architecture mistake in the core design.

wendeldw avatar Oct 23 '14 17:10 wendeldw

I think this is now resolved. Both scroll smoothly. On my Macbook / Chrome, the ui-grid is a bit slower, but not flickery. I think it's just the acceleration settings - interestingly earlier it scrolled too fast on OSX, not sure why it's now a little slow.

PaulL1 avatar Dec 21 '14 08:12 PaulL1

Is there something that changed for ui-grid to struggle to keep up while ng-grid is fine? The ng-grid example seems to work fine so there's surely something that's causing the issue in ui-grid rather than just acceleration settings?

Bo98 avatar Mar 17 '15 20:03 Bo98

Should I open a new issue about this or is this already known?

Bo98 avatar Mar 18 '15 14:03 Bo98

I think that's an unfair comparison, the ng-grid plunker has only 4 columns and no additional features being used (such as edit etc). Compare the large dataset tutorial: http://ui-grid.info/docs/#/tutorial/404_large_data_sets_and_performance, which flickers a little, but is generally good.

I you look at the performance monitoring in chrome the time is all disappearing into angularjs, mostly directive compilation. There's not a huge amount we can do about that.

PaulL1 avatar Mar 18 '15 18:03 PaulL1

I am seeing similar performance in the large dataset tutorial to the ui-grid plunker - especially on mobile.

The ui-grid plunker is also only using 4 columns and no additional features unless I'm missing something that's making the comparison unfair.

Bo98 avatar Mar 18 '15 19:03 Bo98

Ah, then I was probably comparing to the similar discussion on another issue which had 100 columns x 100 rows and all features enabled.

I suspect some of the lack of interest comes from "Hopefully it is not architecture mistake in the core design." which isn't the kind of comment that makes people who've spent 1-2 years building this happy.

PaulL1 avatar Mar 18 '15 20:03 PaulL1

Hello, I'm experiencing the same problem on a v3.1.1 grid of about 20 columns and about 1800 rows, edit enabled on the last four columns, cell navigation. I see the issue has been closed but working it around with either excessRows or virtualThreeshold makes both the initial rendering and vertical scrolling very slow. Is there something else I could try? Thank you, Salvo

salvois avatar Aug 26 '16 14:08 salvois