WPF Performance problems for displaying grid-like planning application
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: WPF Performance problems for displaying grid-like planning application

Hybrid View

  1. #1
    Join Date
    May 2009

    Exclamation 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.

    Kind regards,

  2. #2
    Join Date
    Sep 2002
    14 39'19.65"N / 121 1'44.34"E

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This a Codeguru.com survey!

HTML5 Development Center