WPF Performance Degradation During UI Render

(2) ContentPresenter in the Window that is bound to a property in the underlying ViewModel. This Property references another ViewModel.

(3) A DataTemplate for the ViewModel that will be bound to the ContentPresenter referenced above. This data template instantiates a third-party grid that displays some data.

Whenever the ContentPresenter renders the data from the DataTemplate, it takes approximately three to four seconds for the UI to render. This causes the UI to hang for the duration of the time that it takes to render the content. Since I have little to no control over how the third-party control renders itself - my question involves whether or not it is possible to render content in a way that the UI will not hang.

Please advise.

Thanks.

Chris

-------------Problems Reply------------

How many rows is the grid displaying? And how many of those rows are visible on screen?

I'm asking because it's possible that you've got a UI layout that defeats virtualization. Usually, controls that show a scrollable list of data will perform virtualization. (The built-in ListBox does this, and any 3rd party grid of tolerable quality should do the same.) This is critical for performance, because it means your UI only needs to instantiate those items that are actually visible, rather than everything in your list.

But it's relatively easy to defeat this virtualization by accident. One way is to wrap the list or grid control in a ScrollViewer. You need virtualizing controls to be able to manage their own scrolling for virtualization to work, so the scrolling needs to happen on the inside. Wrapping a control in a ScrollViewer prevents it from doing its own scrolling. Another way it can go wrong is if you plug in a different ItemsPanel. A third possibility is that your list/grid control actually needs to be told to use virtualization.

But if you're using a control that simply takes a long time to render just the stuff you need to show on screen, then there's not much you can do - you'd need to contact the control vendor, or consider using a different vendor...

Related post

I'm currently working on a very large Flash platformer game (hundreds of classes) and dealing with an issue where the game slowly grinds to a halt if you leave it on for long enough. I didn't write the game and so I'm only vaguely familiar with its i

I have an application that is restoring lots of data from a library. We are using Windows server 2003. As the process progresses we are seeing performance degradation. I added some performance counters for 4 of my major tasks, Create file, Read from

What is the limit of rows in a table for SQL Server 2005, when SQL query starts getting slower? Is there any way to find out the limit? I understand it will depend upon the data length of a row. This will also depend on how many more data in other ta

I have a SVN server instance set up on my desktop for the purposes of demonstrating the many benefits of SVN/TortoiseSVN. Performance has today degrading significantly however when performing actions such as viewing the logs etc. This isn't ideal for

Im currently trying to create a Scene in WPF where I have around 250 controls on my screen and the user can Pan and Zoom in and out of these controls using the mouse. I have run the WPF Performance Suite tools on the application when there are a larg

I have installed the latest Windows 7 SDK which contains the WPF Performance Profiler. Perforator does display some data when I launch my app, but the Visual Profiler does not display anything. The timeline moves but not data is collected ... -------

Note for bounty - START: PARAMETERS SNIFFING (that is the only "idea" that was reported in pre-bounty questions) is not the issue here, as you can read in the "update" section at the end of the question. The problem is really related to how sql serve

I have a rather small mysql DB in which I store an handful of pretty small images (320x480), it all behaved really well until recently, the table size is about 1.5Gb and there are about 34,000 records. At that point... ...All of a sudden the performa

I have a WPF window that contains a fancy image with roughly 200 controls (derived from buttons), all of which use one of my 5 templates (paths, shadow effects, etc). Agreed, it is a heavy window to draw. I can live with that. My problem comes from r

Is there a performance degradation when we ALWAYS use nullable value types instead of value types? --------------Solutions------------- As Mitch Wheat pointed about above, no, you should not worry about this. I'm going to give you the short answer re

I am newbie to android. In my tablet, if I make calls more 20, performance degrade. GUI response is very slow. why does the gui performance degrade? I have a trace file. I didn't find the root cause. There is no memory problem. Please help me out Log

I have noticed that after my Grails app has been deployed for about 2 weeks, performance degrades significantly, and I have to redeploy. I am using the Spring Security plugin and caching users. My first inclination is that it has something to do with

Here I would focus on custom application where I got degradation (no need for general discussion about fastness of threads against processes). I've got MPI application on Java which solve some problem using iteration method. The schematic view to app

I'm on osx 10.6.8. I have python 2.6.7 installed via port and natively installed osx python 2.6.1. I use sqlite3 in my script with isolation_level = None. If I use the port python interpreter (2.6.7) my SELECT query takes ~2sec. If I switch to native

I am trying to run Apache and node.js on the same Amazon EC2 instance. After research online, I came up with the following solution: run Apache on port 9000 run node.js apps on port 8001, 8002 and so on. create a reverse proxy in node.js, running on

Has anyone seen any performance degradation when increasing the block size in Hadoop? We're setting up a cluster and we're expecting a large amount of data (100s of GBs) coming in per day that we need to store, so my thought was we could increase the

I am curious about the behavior of GHC runtime with threaded option in case when C FFI calls back Haskell function. I wrote code to measure overhead of a basic function callback (below). While the function callback overhead has already been discussed

I am using lift framework with embedded jetty. My application is running pretty fast if I am it in development. As soon as I make a assembly of it using SBT, the performance degrades upto 20-30 times. The request which was taking 400ms, starts taking