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

Very bad performance in simple grid usage, scrolling and resizing

8 Answers 300 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Morten Nilsen
Top achievements
Rank 1
Morten Nilsen asked on 19 Dec 2011, 05:55 PM
Hello, I am having some serious issues here.

I have defined this grid:

<telerik:RadGridView
    x:Name="something"
    ItemsSource="{Binding Events}"
    telerik:Theming.Theme="Windows7"
    ShowGroupPanel="False"
    AutoGenerateColumns="False"
    ScrollMode="Deferred">
    <telerik:RadGridView.ScrollPositionIndicatorTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding ScrollIndicator}" />
        </DataTemplate>
    </telerik:RadGridView.ScrollPositionIndicatorTemplate>
    <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn Header="ID" DataMemberBinding="{Binding ID}" Width="100" />
        <!--<telerik:GridViewDataColumn Header="Artikkel" DataMemberBinding="{Binding Article}" />
        <telerik:GridViewDataColumn Header="Sats" DataMemberBinding="{Binding Batch}" />
        <telerik:GridViewDataColumn Header="Serienummer" DataMemberBinding="{Binding Serial}" />-->
        <telerik:GridViewDataColumn Header="Operasjon" DataMemberBinding="{Binding EventType}" Width="150" />
        <telerik:GridViewDataColumn Header="Startet" DataMemberBinding="{Binding Started}" Width="100" />
        <telerik:GridViewDataColumn Header="Avsluttet" DataMemberBinding="{Binding Ended}" Width="100" />
        <telerik:GridViewDataColumn Header="Status" Width="100">
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Status}" HorizontalAlignment="Left" FontWeight="Bold" Foreground="{Binding StatusColor}" />
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn Header="Bruker" DataMemberBinding="{Binding EmployeeID}" Width="100" />
        <telerik:GridViewDataColumn Header="Informasjon" DataMemberBinding="{Binding Information}" Width="300" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

Using a bog standard ListView, this was performing just fine - but now I am having UI hangs while scrolling (when scrollmode was realtime) and I get a black background inside the window border while resizing..

What am I missing?

  // Regards, Morten

8 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 20 Dec 2011, 07:48 AM
Hello Morten Nilsen,

I have tried to reproduce the issue you reported, but unfortunately without any success. Could you take a look at the sample attached and let me know whether you can get the same behavior on it ? Is there something that I am missing ?  

Best wishes,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Morten Nilsen
Top achievements
Rank 1
answered on 20 Dec 2011, 09:26 AM
Hello, thanks for taking the time to look at it.

I am seeing the exact same behaviour with your sample as my own code.
Clicking the tray to scroll, there is a noticable delay before the grid scrolls, and resizing the window, I see a black background inside the window.

// Regards, Morten
0
Morten Nilsen
Top achievements
Rank 1
answered on 20 Dec 2011, 09:29 AM
I changed the ScrollMode to RealTime, and rapidly scrolled to the top and bottom several times.
Just like I was experiencing on my own codebase, the drag handle was lagging behind the mouse.

  // Regards, Morten
0
Morten Nilsen
Top achievements
Rank 1
answered on 20 Dec 2011, 09:49 AM
Breakthrough!
When I disable virtualization on your sample application, the performance problem goes away!
But I would expect that to be a bad idea for grids with many rows.

  // Cheers, Morten
0
Morten Nilsen
Top achievements
Rank 1
answered on 20 Dec 2011, 09:53 AM
Yeah, going back to my application, horizontal scrolling becomes unusable and the application hangs a bit when loading the grid.
I wouldn't say I have a lot of rows, though - it is less than 200..

  // Regards, Morten
0
Maya
Telerik team
answered on 23 Dec 2011, 08:43 AM
Hello,

I have made yet another try on the sample I previously attached, but unfortunately I am still not able to reproduce the behavior you described. Could you take a look at this small video illustrating my attempts ? Am I missing something ? Is there anything more that I need to do in order to get the same behavior ? 
Nevertheless, it is not recommended to turn off the virtualization as the performance of the grid will most probably be degraded.
 

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Morten Nilsen
Top achievements
Rank 1
answered on 03 Jan 2012, 01:41 PM
Hello,

I definitely do not want to turn off virtualization, I merely did so as a step in my testing :)
For the interim, I opted to use the standard WPF grid.

In your video, you can spot one of the things I described, the black flash towards the end after you enable real-time scrolling.

I just now started up my own application without VS attached, and it does appear to be dramatically more well behaved..
Before doing that, I turned on "Just My Code" and set Data Binding under WPF Trace settings to off for the output window, without that affecting the performance.

What sort of a computer are you testing these things on?
This box is a Core2 Duo E8500 with 8GB RAM and 64 bit Windows 7.

  // Regards, Morten
0
Morten Nilsen
Top achievements
Rank 1
answered on 03 Jan 2012, 07:44 PM
I found the cause!

My IntelliTrace was set to trace events and call information.
When I changed it to events only, the performance problem vanished immediately!

  -- Cheers, Morten
Tags
GridView
Asked by
Morten Nilsen
Top achievements
Rank 1
Answers by
Maya
Telerik team
Morten Nilsen
Top achievements
Rank 1
Share this question
or