1

I'm looking for general performance improvement recommendation. UI looks like this:

enter image description here

There is 5 columns and about 700 items loaded in lists. All data loading is quick. But for UI to come up it takes good 5+ seconds. Resizing is very slow too. Adding items and removing items take long.

It is definitely related to drawing. Gradients, icons, etc. I wonder what tricks I can use to speed it up?

Any general ideas on why this might be happening?

katit
  • 17,375
  • 35
  • 128
  • 256
  • 6
    Most likely it's not the drawing itself that's causing performance problems, but rather the complex layout/arrange passes with so many controls. In particular, make sure you're taking advantage of [Virtualization](http://stackoverflow.com/questions/2143655/wpf-list-boxes-and-virtualization) wherever possible to prevent instantiation of hundreds of visual elements that aren't actually being displayed yet. You get it for free with ListBox, but if you're doing more custom things with scroll bars, you might not be virtualizing. – Dan Bryant Jan 30 '14 at 18:15
  • 1
    Only recommendation I can give is to reduce the complexity of the UI by separating it into different windows/screens. And it seems pretty bad from usability perspective. Why would you need to have list for whole week when you only have valid data for today? – Euphoric Jan 30 '14 at 18:20
  • It's dev sample. In production data is in all columns. Introducing screens is not an option, client rather deal with slow startup than popups. – katit Jan 30 '14 at 18:23
  • Dan, seems like you know whats going on here. All info they need is right there. Clients have real-time updates (TCPIP), most valuable info hidden behind icons (with tooltips) but idea is to have all they need right there. They can hide/minimize columns to work with 3 days for example, but problem is still there. I just checked and yes, it's ItemsList wrapped with ScrollViewer. Will try to make it ListBox with virtualization.. – katit Jan 30 '14 at 18:26
  • See [this answer](http://stackoverflow.com/questions/2783845/virtualizing-an-itemscontrol) if you're using ItemsControl rather than ListBox. It has an example of how to re-template the ItemsControl with a scroll viewer to allow virtualization. – Dan Bryant Jan 30 '14 at 18:30
  • I see no difference between complex 2deep scrolling and simple popup. Hell if they have multiple displays, they could drag the windows to other screen and have it updating there. But I guess you already put tons of thought into usability judging from the nice colors. – Euphoric Jan 30 '14 at 18:40
  • Euphoric, Data layed out so scrolling almost never needed in real application. People use filters to adjust data to what they need and almost always it's 1 screen. This is not v1 by any means... – katit Jan 30 '14 at 19:09
  • @DanBryant I did re-template ItemsControl(s) and that pretty much fixed it. If you can make it an answer I will accept it. Thanks! – katit Jan 30 '14 at 20:05
  • And look at the individual controls. A TextBlock is faster than TextBox. A Unicode symbol is faster than a graphic. – paparazzo Jan 30 '14 at 20:19
  • I have faced similar problem in the past, and figured that those gradients were the cause for performance decrease. The solution that worked for me is that i replaced all backgrounds of my contents to `.png` Images instead of using `SolidColorbrushe` and `Gradients` – Mujahid Daud Khan Jan 31 '14 at 11:44

0 Answers0