Ribbon slowing down typing + CPU load

Ribbon for WPF Forum

Posted 9 years ago by Radu
Avatar
Hi

We noticed the typing performance in our app is very low... and the CPU load gets very high. That's not the case in a standard WPF app.

Using a very simple test app that has ONLY a Ribbon we could reproduce the behavior:

<ribbon:RibbonWindow x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
        Title="MainWindow" Height="350" Width="525">
    <DockPanel>
        <ribbon:Ribbon DockPanel.Dock="Top"
                       IsCustomizeQuickAccessToolBarMenuItemVisible="True"
                       IsMinimized="False"
                       IsQuickAccessToolBarCustomizationEnabled="True">
            <ribbon:Tab Label="A">
                <ribbon:Group Label="Edit">
                    <TextBox Width="500"/>
                </ribbon:Group>
            </ribbon:Tab>
            <ribbon:Tab Label="B"/>
            <ribbon:Tab Label="C"/>
        </ribbon:Ribbon>
    </DockPanel>
</ribbon:RibbonWindow>

Start typing quite fast something in the TextBox and in the meanwhile watch CPU load...
Having a Ribbon with a lot of buttons inside makes also the caret in the TextBox to be displayed a bit delayed compared with the current typing position.

Any advice?

Thx
Radu

[Modified at 05/25/2010 05:17 AM]

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Radu,

I ran your sample and didn't notice any real slowdowns. I was banging on the keyboard pretty hard and it still was fast for me. Further I used dotTrace to performance profile the application and it didn't show any of our code as being in the code hotspots.

I'd be interested to see if putting the TextBox in a native WPF ToolBar control yields some CPU load as well. Perhaps it's due to the TextBox being in a separate focus scope. Both Ribbon and ToolBar use separate focus scopes from the normal focus scope.

If that doesn't help then you can try running dotTrace or another performance profiler yourself.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.