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

ScheduleView Virtualization

3 Answers 112 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Bosko
Top achievements
Rank 1
Bosko asked on 17 Oct 2019, 12:19 PM

Hello,

 

I`m trying to boost up the performance of the ScheduleView control when i have a lot of appointments.

I can see that Telerik is announcing a build in UI Virtualization for schedule view at the following link:  https://www.telerik.com/products/wpf/scheduleview.aspx 

but I can`t see it nor I can find a tutorial how to apply it on a Schedule view control.

I`ve also checked the tutorials about UI and Data virtualization  but I cannot see explained anything about the ScheduleView control.

For the data virtualization it`s said that the NOT supported.

https://docs.telerik.com/devtools/wpf/common-information/consuming-data/using-data-virtualization    

 

Can anyone point me to the right direction?   

I`m using 

My appointment template doesn`t seems like too complex. I`m experiencing poor performance once the number of appointments are more than ~100

3 Answers, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 22 Oct 2019, 10:11 AM

Hello Bosko,

Thank you for the provided links.

The RadScheduleView does implement UI Virtualization for the visual elements, which represent the appointments. This feature is available out-of-the box and you don't have to do anything to turn it on.

That said, I can suggest a few options for improving the performance with a high amount of appointments and resources:

1. Since there is no virtualization for the group headers, you can optimize this case by creating a custom GroupHeader style with fewer elements in the ControlTemplate of the GroupHeader.

2. You could also apply group filtering, i.e. not show all groups at one time, but only on user's demand. You can find a sample implementation in our online demos under RadScheduleView-> Grouping and filtering.

3. You can load only the appointments that are in the visible range as demonstrated in the Load on Demand RadScheduleView example in our demos. This will reduce the amount of data that needs to be processed (grouped, sorted, etc.). 

I hope you find this helpful.

Regards,
Vladimir Stoyanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Bosko
Top achievements
Rank 1
answered on 13 Nov 2019, 02:30 PM

Hi Vladimir,

 

Thank you for your answer.

Point 1 fixed the rendering issue in a way (on the cost of loosing UX).  Points 2) and 3) I`ve already had implemented.

 

The slow rendering performance is that in my GroupHeaderContentTemplate i only have a text block (so it`s content is very simple), BUT I also had few converters and that basically took most of the time needed for the rendering.

 

One thing that i don`t understand is that the rendering speed got even faster after I removed a PreviewMouseLeftButtonDown event trigger from the parent grid.  Why would the event trigger influence the rendering speed?

This is my code, with the parts that I`ve commented in order to gain the performance:

 <telerik:RadScheduleView.GroupHeaderContentTemplate>
<DataTemplate>
    <Grid MinWidth="150"
                MaxWidth="150"
                Height="47">

        <!--<i:Interaction.Triggers>
            <i:EventTrigger EventName="PreviewMouseLeftButtonDown" >
                <i:InvokeCommandAction Command="{Binding DataContext.SelectBasedOnGroupHeaderCommand,ElementName=Level1AppointmentsView}"
                                            CommandParameter="{Binding Items[0]}" />
            </i:EventTrigger>
        </i:Interaction.Triggers>-->
        <TextBlock Margin="2.5,2.5,0,2.5"
                        x:Name="_PartHeaderText">
            <!--<TextBlock.Background>
                <MultiBinding Converter="{StaticResource GroupHeaderBackgroundConverter}">
                    <Binding Path="Items[0]"  />
                    <Binding Path="Items[0].IsHighlighted" />
                    <Binding ElementName="_PartHeaderText"/>
                </MultiBinding>
            </TextBlock.Background>-->
                <Run Text="  " />
                <Run Text="{Binding Name, FallbackValue=None, Mode=OneWay}" />
        </TextBlock>
        <!--<StackPanel Orientation="Horizontal" IsEnabled="False" Visibility="Collapsed"
                        Margin="0,3,7,0"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Top">
            <StackPanel.Opacity>
                <MultiBinding Converter="{StaticResource GroupHeaderOpacityToSelectionConverter}">
                    <Binding  ElementName="_PartHeaderText" />
                    <Binding ElementName="Level1AppointmentsView"
                                    Path="DataContext.HighlightedLevel1Appointments"
                                    UpdateSourceTrigger="PropertyChanged" />
                    <Binding ElementName="_PartHeaderText"
                                    Path="Text" />
                </MultiBinding>
            </StackPanel.Opacity>
        </StackPanel>-->
    </Grid>
</DataTemplate>
</telerik:RadScheduleView.GroupHeaderContentTemplate>

0
Vladimir Stoyanov
Telerik team
answered on 18 Nov 2019, 09:30 AM

Hello Bosko,

I am happy to hear that you found the previous suggestion helpful. 

As for the PreviewMouseLeftButtonDown handler, I am not sure why it would affect the rendering of the control. If you find it possible, you can isolate the described behavior in a sample project and send it over in a new support ticket (since project files cannot be attached to forum posts) and I will gladly investigate the scenario. 

Regards,
Vladimir Stoyanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ScheduleView
Asked by
Bosko
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Bosko
Top achievements
Rank 1
Share this question
or