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

Virtualization & Alternate Row

9 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Emil Einarsson
Top achievements
Rank 1
Emil Einarsson asked on 13 Oct 2010, 02:57 PM
Hi.

I'm experiencing some issues right now with the grid.

I have a grid loaded with 1000 simple objects rendering 4 columns.

Weird thing is, when I start to scroll in this grid, the browser memory stays nicely at around 50mb and scrolling is smooth.

But then I enable alternate row coloring and suddenly the scrolling is superslow. By scrolling up and down I can reach 200mb memory in just a couple of seconds, and eventually the browser will crash cause of something totally rageloading stuff into the memory.

Any knows issues with scrolling like this? It seems like Virtualization stops working when I enabled the row coloring, altough I'm just speculating.

Also, do Telerik support Recycling as virtualization method?

Best regards,
Emil

9 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 13 Oct 2010, 04:41 PM
Hi Emil Einarsson,

Did you set the AlternateRowBackground or AlternateRowStyle properties of the RadGridView?
The latter will cause significant performance issues, but the AlternateRowBackground should be ok.



Best wishes,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Sam
Top achievements
Rank 1
answered on 13 Oct 2010, 08:59 PM
I am experiencing the same performance issues.  Simpy setting AlternateRowBackground will significantly decrease performance of scrolling:

AlternateRowBackground="#FFEFF5F8" AlternationCount="2"

What is the cause of the problem, and what workarounds/tips are there to increase scrolling in a virtualized grid?

--Sam
0
Emil Einarsson
Top achievements
Rank 1
answered on 14 Oct 2010, 07:45 AM
As Sam said, setting the background property only did not help.

Scrolling with the mouse is fairly ok, good enough to live with. But if you drag the scrollbar-block-thingy, for fast scrolling, then its going to go crazy slow again. And the memory flooding continues, which pretty much is the biggest problem (meanwhile scrolling while the memory gets flooded, the CPU is at 100% load aswell).

This is weird, anyway, if it cant be fixed in some way, we'll have to drop the alternating background option, which sucks cause its awesome. :(
0
Vlad
Telerik team
answered on 14 Oct 2010, 08:05 AM
Hi guys,

 I've just tried this however everything worked pretty fast for me. You can check the attached application -  RadGridView bound to 1 mil. records with 4 properties. 

Best wishes,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Emil Einarsson
Top achievements
Rank 1
answered on 14 Oct 2010, 08:08 AM
Hi again.

"Solved" it by removing "RowStyle". But then the grid wont look the way I want it to. I want to be able to change the colors of selected and hovered rows etc.

How can I do that?

Its pretty weird, since when you use a theme for the grid, it's still a "style" in the background for handling that, isnt it? And that works wonders.
0
Accepted
Vlad
Telerik team
answered on 14 Oct 2010, 08:33 AM
Hi Emil,

 You can use implicit styles to avoid performance problems. RowStyle was the old Silverlight 3 way however now with Silverlight 4 you can do this without any problems. I've attached modified version of my application to illustrate you this. 

Sincerely yours,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Emil Einarsson
Top achievements
Rank 1
answered on 14 Oct 2010, 08:52 AM
Awesome! This guy nailed it. It's working great now with implicit styles!

Thank you for quick and awesome support. :)
0
Sam
Top achievements
Rank 1
answered on 14 Oct 2010, 04:55 PM
Removing RowStyle fixed performance for me as well.  Scrolling is still choppy with the amount of data we are displaying (18 rows, hundreds of records), but it isn't abysmal like it was when we were using a RowStyle.

Is there a resource that has guidelines to help scrolling performance with large grids?  Setting EnableColumnVirtualization helped with horizontal scrolling, but I'm looking for more tips to get scrolling to be smooth (without resorting to using deferred mode).

--Sam
0
Vlad
Telerik team
answered on 15 Oct 2010, 07:23 AM
Hi,

 Both columns and rows virtualization are on by default - you do not need to set anything. You can check this article for more info about performance issues - we just updated the article with more info about RowStyle case. 

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Emil Einarsson
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Sam
Top achievements
Rank 1
Emil Einarsson
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or