<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Veracity Solutions Blog &#187; WPF Performance</title>
	<atom:link href="http://blogs.veracitysolutions.com/category/wpf-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.veracitysolutions.com</link>
	<description>Software Consulting That Rocks</description>
	<lastBuildDate>Thu, 22 Apr 2010 17:21:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ListView (and ListBox) Performance Issues</title>
		<link>http://blogs.veracitysolutions.com/listview-and-listbox-performance-issues/</link>
		<comments>http://blogs.veracitysolutions.com/listview-and-listbox-performance-issues/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 23:46:02 +0000</pubDate>
		<dc:creator>Matthias Shapiro</dc:creator>
				<category><![CDATA[ListView]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[WPF Performance]]></category>

		<guid isPermaLink="false">http://www.designerwpf.com/2008/02/12/listview-and-listbox-performance-issues/</guid>
		<description><![CDATA[I was working on one of my projects today and I noticed that one of our popups displaying search results in a ListBox was having really serious performance problems.  After determining that the problem was, in fact, on the WPF side of things, I was somewhat baffled. I wasn&#8217;t doing anything that I could think of that should be [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on one of my projects today and I noticed that one of our popups displaying search results in a ListBox was having really serious performance problems.  After determining that the problem was, in fact, on the WPF side of things, I was somewhat baffled. I wasn&#8217;t doing anything that I could think of that should be pushing the limit of what WPF could do.</p>
<p> Finally, I went looking online for an answer and discovered a list of possible <a href="http://itknowledgeexchange.techtarget.com/wpf/listview-is-it-really-too-slow/">performance killers for the ListView (and ListBox) on Mark Shurmer&#8217;s blog</a>. Chief among his no-no&#8217;s:</p>
<blockquote><p>Embedding the ListView inside a StackPanel</p></blockquote>
<p>Which is exactly what I was doing.</p>
<p>Why is this a problem? To answer that question, let&#8217;s take a look at the ItemsPanel at runtime using <a href="http://www.designerwpf.com/2007/12/27/designers-guide-to-debugging-wpf-applications-with-snoop/">Snoop</a>. When I place my ListBox into a Grid, here is what my ItemsPanel looks like:</p>
<p><span id="more-250"></span></p>
<p><img src="http://www.designerwpf.com/wp-content/uploads/2008/02/gooditemspanel.png" alt="goodItemsPanel" /></p>
<p>If I change back to what I originally had (my ListBox in a StackPanel), here is what my ItemsPanel looks like:</p>
<p><img src="http://www.designerwpf.com/wp-content/uploads/2008/02/baditemspanel.png" alt="BadItemsPanel1" /><img src="http://www.designerwpf.com/wp-content/uploads/2008/02/baditemspanel2.png" alt="badItemsPanel2" />             <img src="http://www.designerwpf.com/wp-content/uploads/2008/02/baditemspanel3.png" alt="BadItemsPanel3" /></p>
<p>That&#8217;s actually not even the end of it. That&#8217;s about half.</p>
<p>As far as I can tell, all of Mark&#8217;s suggestions have to do with making sure that the VirtualizingStackPanel can do what it needs to do in order to keep your program running at a reasonable rate. Good stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.veracitysolutions.com/listview-and-listbox-performance-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
