Search code examples
wpfperformancec#-4.0gpuperformance-testing

Performance issue with "Measure"


I'm encountering a performance issue in my application. Essentially I click a button, and a list is populated with databound data (this is virtualized because of the large amount of data), and then click another button which will add a row to an associated list view. I'm being vague because I think it's just necessary to illustrate how little is actually going on in the UI.

Here's what I know:

  • I don't see the issue on my my beefy dev computer running Win 7 Pro, nor on XP SP3 machines with decent specs. I only see it on a certain brand of laptops (Lenovo ThinkPads) running Win 7 enterprise with 4 GB RAM and Core i5 CPU (much beefier than the XP desktop).
  • Because of the aforementioned findings, I'm not thinking this is an issue with code.
  • I profiled with Microsoft's PerfView tool and noticed what I would assume to be an incredibly large number of calls to UIElement.Measure (not ever invoked directly by our code), something I don't see when I profile on the other machines.
  • The laptop has a 1360x780 resolution, so I thought that perhaps the small resolution was causing the GPU to unnecessarily render the controls because of some data binding that I might be doing (which might explain the large number of calls to Measure()). I extended the laptop's display to my 24" monitor and didn't see any improvement.

Right now I'm assuming that the issue is with the GPU. I've updated the driver with no improvements.

  1. Even though I don't think it's an issue with code, is there a WPF equivalent to "SuspendLayout()"
  2. Is there a way to profile GPU performance to see if it is being hammered during certain processes
  3. (far shot) Has anyone had similar performance issues that seem to be computer specific and suggestions on how to track them down?

Sorry if this is a vague question. I tried to make it comply with SO's usage reqs. Let me know if you want any more info.

Just as an addendum: The program is using WPF, C# 4.0, the issue seems to be around Telerik controls (though I don't think they're suspect since we use them elsewhere without issue).


Solution

  • Turns out it's caused by a known Microsoft issue. I’d try to explain, but I won’t. Mainly because I can’t.

    Article talking about fix (see post by Viðar on 3 August 2010):

    Microsoft Hotfix site: http://support.microsoft.com/kb/2484841/en-us

    Fix: http://archive.msdn.microsoft.com/KB2484841/Release/ProjectReleases.aspx?ReleaseId=5583