Is this slow WPF TextBlock performance expected?

后端 未结 3 554
灰色年华
灰色年华 2020-12-15 19:11

I am doing some benchmarking to determine if I can use WPF for a new product. However, early performance results are disappointing. I made a quick app that uses data bindi

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 19:45

    There is a lot one can do wrong in WPF, as far as performance is concerned. Lot of people approach it like a win forms application, html web page, or some hybrid attack on developing the application and because of this there are a lot of bad evaluations of WPF.

    I understand that you are trying to do performance testing to see if a WPF can work for your platform and a good example of how to get your WPF application control to perform for the type of load you are expecting can be found at the below link.

    http://msdn.microsoft.com/en-us/magazine/dd483292.aspx

    Petzold guides you through the process of optimizing an items control to render optimally for the load of data being displayed on the UI.

    To do a fair test I would write a sample application that deals with a sample of the data you are going to be dealing with, and then test the performance of that code. There are a large number of optimizations that can be applied to make a WPF application scream and use less CPU, but they all depend on your application and how it is representing your data.

    Hope this helps.

提交回复
热议问题