This is a migrated thread and some comments may be shown as answers.

Virtual scrolling with different pageSize to DataSource

4 Answers 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rowan
Top achievements
Rank 1
Rowan asked on 01 Oct 2015, 06:51 AM

Hello,

So Grid virtual scrolling is a great concept and allows us to show large amounts of data with good performance. The problem we have is that it couples two unrelated performance bottlenecks into a single pageSize variable on DataSource:

1. Backend/Remote fetch performance and processing.

2. Client side HTML rendering performance.

Generally speaking we can fetch a large number of items from the Backend without hitting any performance bottlenecks. This makes for the most efficient use of bandwidth (smaller HTML request overhead) and a better user experience (don't keep hitting the load bar). The problem is that if we tune a larger value for pageSize to make (1) work better, then suddenly we start hitting Client side rendering bottlenecks in (2).

In an ideal world the pageSize used by the Grid for display virtualization would be an independent value that could be tuned differently to the pageSize of the DataSource. Is there a way to achieve this in the current library?  I was thinking perhaps I could somehow wrap a remote DataSource with pageSize A in a local DataSource with pageSize B, and then set the local DataSource on the grid.

 

thanks,

Rowan

4 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 05 Oct 2015, 08:52 AM

Hello Rowan,

 

I'm afraid that this is not supported. With current implementation pageSize is directly related to rendered items in the Grid and how DataSource calculates how many items to request.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Rowan
Top achievements
Rank 1
answered on 07 Oct 2015, 05:39 AM

Hi Nikolay,

One thought I had was that there is already an undocumented prefetch method on datasources that populates the _ranges cache. It seems that we could use prefetch to get a large batch of data from the remote transport (without rendering it), and then have a small pageSize that would just get it's data out of the _ranges cache when refreshing the view (rather than hitting the remote transport again)?

 Does that seem like a reasonable approach?

 thanks,

Rowan

0
Nikolay Rusev
Telerik team
answered on 09 Oct 2015, 05:44 AM

Hello Rowan,

 

We are not encouraging using internal, undocumented API as it might lead to unexpected behaviors. The _rages cache is used to for getting pages with are already fetched as virtual scrolling pre-fetches pages ahead of the time for more smooth scrolling experience.

 

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Umair
Top achievements
Rank 1
answered on 07 Dec 2017, 05:24 AM
This is something I could really use. Any updates on this? Is pageSize is coupled with both Client Side rendering & server request?
Tags
Grid
Asked by
Rowan
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Rowan
Top achievements
Rank 1
Umair
Top achievements
Rank 1
Share this question
or