May 11th, 2009, 04:36 AM
WPF Performance problems for displaying grid-like planning application
For a project concerning a planning application, we encounter major WPF performance problems.
The application has to show a grid-like presentation of persons on the Y-axis and dates on the X-axis,
and every "cell" represents a duty or task for the person on this date. The presentation of one cell is graphical,
drawing a rounded rectangle and some lines and text.
Now we have to be able to show a full month for around 200 persons, yielding a total of 6000 cells. (so this means 6000 rectangles, 24000 textblocks, 12000 lines). Of course this is not shown onscreen all at once, only around 5 days on the X-axis and 10 persons on the Y-axis (so 50 cells at once on-screen)
we have tried a multitude of approaches, ranging from drawing everything upfront in a grid/canvas within a scrollviewer. It takes over 10 seconds before anything is shown on screen (no doubt due to the layouting) but once
it was shown, scrolling was really fast.
Then we tried an approach with itemscontrols/listbox of listboxes/virtualizing stackpanel, which made that the grid
was initially shown much faster, but then scrolling was unacceptably slow.
Can anyone give some starting points on how to tackle this problem ? We looked at some third party grid controls,
and also the WPF toolkit grid on Codeplex, but it feels like this would not be an adequate solution to our problem.
May 11th, 2009, 11:52 AM
Re: WPF Performance problems for displaying grid-like planning application
Aside from just stating that normally, and in theory, the VirtualizingStackPanel approach (or, styling an existing control that is already virtualizing) should be the way to go - but with WPF, theory and practice are often diverging a lot... I would point you to the Performance Profiling Tools for WPF, to find out, in the first place, where exactly your CPU power is getting lost.
Tags for this Thread
Click Here to Expand Forum to Full Width