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

RadMenu / RadContextMenu slow?

6 Answers 163 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 09 Jul 2010, 01:23 PM
Has anybody noticed that the latest RadMenu and RadContextMenu controls seem slower than before?  I thought that it might have just been me or my app, and I slowly stripped everything out of my text (binding, styles, templateselectors, etc) until I was left with the bare minimum and it still seems sluggish...  Thoughts?

I'm using version 2010.1.603.1040.

Thanks,
Rob

And here's a quick sample project that seems to react slowly in my case...
<Grid x:Name="LayoutRoot" Background="Orchid" Margin="5">
    <ToggleButton x:Name="toggle" Content="Desktop" IsChecked="{Binding IsOpen, ElementName=radContextMenu, Mode=TwoWay}" Height="40" Width="40">
        <RadNav:RadContextMenu.ContextMenu>
        <RadNav:RadContextMenu x:Name="radContextMenu" ShowDelay="0" Placement="Bottom" >
                <RadNav:RadMenuItem Header="1"/>
        <RadNav:RadMenuItem Header="2"/>
        <RadNav:RadMenuItem Header="3"/>
            </RadNav:RadContextMenu>
        </RadNav:RadContextMenu.ContextMenu>
    </ToggleButton>
</Grid>

6 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 12 Jul 2010, 04:42 PM
Hello Rob,

Thank you for contacting us.

Could you please check our online examples for RadContextMenu and RadMenu and tell us if you suffer the same problem with them.
 
I will be glad to assist you further.

Greetings,
George
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
Kelly Wike
Top achievements
Rank 1
answered on 26 Jul 2010, 01:32 PM
I too have noticed a significant performance difference between the RadMenu in RadControls for Silverlight Q1 2010 SP2 and the Q2 2010 version (2010.2.714.1040).  Once a sub menu is visited once, it responds normally, but navigating to a sub menu for the first time often results in a 1 to 3 second delay in presenting the items and the hover visual state.

The example project only loads a few items, so it is not very noticeable.  I will try to modify the example project to load many more sub menus.
0
Rob
Top achievements
Rank 1
answered on 26 Jul 2010, 02:24 PM

I think I have figured out the problem to this...  I made a pretty significant remodel on my application recently which involved using a lot of shadow effects as well as several RadMenus and unfortunately, the radmenus seemed to be the most unresponsive piece of the app and were blamed.

However, after removing the shadow effects, the radmenus along with the rest of the app sprung to life again so I will be avoiding shadow effects in the future.  As a side note, there is a telerik control used for creating shadows in the default templates - has anybody complained about that causing performance issues in the past?

To illustrate my point, here is a small project that includes just two small effects and a radmenu.  Notice that the addition/removal of the effects seems to effect the radmenu significantly....

<UserControl
    x:Class="SilverlightApplication33.MainPage"
    Width="640" Height="480">
  
    <Grid x:Name="LayoutRoot" Background="White">
  
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
          
        <Ellipse Fill="Lavender" Stroke="Plum" StrokeThickness="4">
            <!--<Ellipse.Effect>
                <DropShadowEffect  BlurRadius="10" Color="Black" Direction="310" Opacity="0.8" />
            </Ellipse.Effect>-->
        </Ellipse>
          
        <Rectangle Fill="Pink" Stroke="Red" StrokeThickness="4" Margin="20">
            <!--<Rectangle.Effect>
                <BlurEffect  Radius="20" />
            </Rectangle.Effect>-->
        </Rectangle>
          
          
            <telerik:RadMenu Grid.Column="1">
                <telerik:RadMenuItem Header="Item 1">
                    <telerik:RadMenuItem Header="Sub Item 1"/>
                    <telerik:RadMenuItem Header="Sub Item 2"/>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Header="Item 2">
                    <telerik:RadMenuItem Header="Sub Item 3"/>
                    <telerik:RadMenuItem Header="Sub Item 4"/>
                    <telerik:RadMenuItem Header="Sub Item 5"/>
                </telerik:RadMenuItem>
            </telerik:RadMenu>
          
    </Grid>
  
</UserControl>
0
Accepted
Valeri Hristov
Telerik team
answered on 28 Jul 2010, 07:49 AM
Hello Rob,

Our shadow chrome control contains several borders, hence it does not work in exactly the same way as the DropShadowEffect, e.g. it will not properly "shadow" elements with non-rectangular shape. It could cause performance hit if used excessivly, since it adds several visual elements in the tree.

Sincerely yours,
Valeri Hristov
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
Kelly Wike
Top achievements
Rank 1
answered on 05 Aug 2010, 04:24 PM
The slow down happens when you have a large number of menu items with each having data in the Tag property.  This was not an issue in the Q1 release.  The work around is to put the data in the DataContext property instead of Tag.

0
Rob
Top achievements
Rank 1
answered on 05 Aug 2010, 06:10 PM
Interesting.  I'll try removing some of the tag properties to see if things speed up...
Tags
General Discussions
Asked by
Rob
Top achievements
Rank 1
Answers by
George
Telerik team
Kelly Wike
Top achievements
Rank 1
Rob
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or