Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

performance issue with wpf toolkit datagrid and uiautomation

$
0
0

Hi,

I am running into the issue described in the following blog:

http://blogs.msdn.com/b/jgoldb/archive/2009/12/18/wpf-performance-on-tablet-touch-enabled-machines.aspx

I am using the WPF Toolkit DataGrid with .NET 3.5 SP1.

When I disable UI Automation (by returning a fake windows peer, as mentioned in the above link), it performs OK. I have a datagrid used to show results from a user search into a database. It has 8 columns and could end up having over 30,000 rows, depending on the search. It has UI Virtualization enabled, and it renders about 13 rows at a time. Columns can have small images or text.  I did modify the DataTemplate of some of the text columns to use a TextBlock with support for ellipsis and tooltip.

If UI Automation is not disabled, it performs OK on Win 7 desktop PCs as long as one doesn’t bring up say Windows Narrator (order of seconds to display results). With Narrator, it takes minutes to display results, and in the meantime the application is non-responsive and the CPU load goes up 25%. Same thing happens on any tablet (Win 7 or 8), with or without Narrator (likely because of TabTip.exe).

There is a hotfix for this, at http://archive.msdn.microsoft.com/KB978520 .  I was able to install it on XP, and I think it is faster there, but it still takes over 1 minute to render the 13 rows. I couldn’t install the hotfix on any of 3 Win 7 PCs I tried it on, because it always said “The update is not applicable to your computer”. And there is no hotfix for Windows 8.

I also changed the config file so that the app could run using.NET 4.5 on Windows 8. It ran fine, but again, it wasn’t fast enough (I didn’t measure the time, but it probably was over 1 minute like with Windows XP).

I have two questions:

1. Is there any workaround for this issue in .NET 3.5, outside of disabling automation altogether for that Window?

2. Would I see much better performance if I were to switch to .NET 4.0 and use the .NET 4.0 datagrid? I know it is supposed to be faster in .NET 4.0, but if it takes over a minute to render 13 rows that would still not be acceptable in the application I am working on.

Thanks in advance,

Nick



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>