Headline: Charles Petzold did a great job showing some of the performance characteristics of various approaches of WPF (Windows Presentation Foundation) and here I show some of the resulting numbers on my computer.
In March 2009 Charles Petzold had an excellent MSDN article called “Writing More Efficient ItemsControls”. I’m not going to bother repeating that good information here.
#1 First Try
#2 Converters
#3 Presenter
#4 Custom Dot
#5 Custom ScatterPlot
#6 Better Custom ScatterPlot
Results
All these examples were run with 10,000 points. Below is a table that shows all those results plus the amount of memory used for each.
1 Million Points
Now all the above were done with 10,000 points. I only tried 1 million points with #6 and here were those results.
Of course it didn’t really come up that fast and the memory used was 1.8 GB RAM. That’s a lot. And despite what the numbers say, it took over 90 seconds for this to display.
Over 90 seconds for 1 million points to display!
So for lots of points, these techniques still don’t work well. But you can learn a lot from this set of code samples.
Leave a Reply