<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Recycling that Item Container</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx</link><description>Item container recycling is a one of the many new features in SP1. I'm going to talk a little bit about it here. What is it? As a little background, the VirtualizingStackPanel ’s virtualization scheme basically works like this: generate containers when</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Scrolling Performance in WPF</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#8531502</link><pubDate>Thu, 22 May 2008 11:51:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8531502</guid><dc:creator>Rudi Grobler</dc:creator><description>&lt;p&gt;With the beta release of .NET 3.5 SP1, scrolling received some much needed performance increases! Lets&lt;/p&gt;
</description></item><item><title>WPF 3.5 SP1 Feature: Non-live Scrolling</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#8531868</link><pubDate>Thu, 22 May 2008 17:58:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8531868</guid><dc:creator>Vincent Sibal's Blog</dc:creator><description>&lt;p&gt;So far for the new WPF 3.5 SP1 features, I've surveyed Item Container Recycling , Data Formatting , and&lt;/p&gt;
</description></item><item><title>re: Recycling that Item Container</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#8720246</link><pubDate>Fri, 11 Jul 2008 08:39:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8720246</guid><dc:creator>shunchen</dc:creator><description>&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;While i use the listview in WPF, I found a urgent question. I know that it has implemented the UI virtualization in listview, so it can throw away containers every time they go out of view. But i want to know what it mean exactly about &amp;quot;throw away&amp;quot;. By my test, it seems the memory are always occupied, not released. For example, i add 1000+ items into listview, then it will take up a large number of memory while i scrolling. The most important is that the memory can't be released automatically, except closing the application.&lt;/p&gt;
&lt;p&gt;What can i do about the issue?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>re: Recycling that Item Container</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#8720710</link><pubDate>Fri, 11 Jul 2008 11:58:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8720710</guid><dc:creator>vinsibal</dc:creator><description>&lt;p&gt;Virtualization from the VirtualizingStackPanel's point of view means that memory is allocated for the panel's item containers that are in view. &amp;nbsp;When they go out of view they are &amp;quot;thrown away&amp;quot; meaning they will be set to be garbage collected (whenever that will be which is set by the garbage collector). &amp;nbsp;I'm not exactly sure how you are testing the memory footprint of your app from what you are saying so I can't really make any conclusions from it. &amp;nbsp;Also, it's a managed app so you only have so much control of the garbage collector. &amp;nbsp;Do you also have item container recycling turned on? &amp;nbsp;I just did a really quick and dirty test with an app that I'm current developing and added a ListView with 100 items and item container recycling turn on and off. &amp;nbsp;With it off the memory footprint of my app was between 132MB - 135MB. &amp;nbsp;When I turned it back on it was between 77MB - 84MB. &amp;nbsp;So one thing that you can do and get for free is turn on item container recycling (if you haven't done so).&lt;/p&gt;
&lt;p&gt;Also, if you do want to see the performance impact, try turning off virtualization and then try scrolling. &amp;nbsp;I accidentally ran into this issue the other day as I forgot that when you add grouping, virtualization is automatically turned off. &amp;nbsp;I had around 4000 items which is relatively not that many and my app was slowed down to a crawl. &amp;nbsp;&lt;/p&gt;
</description></item><item><title>re: Recycling that Item Container</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#8737803</link><pubDate>Wed, 16 Jul 2008 13:02:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8737803</guid><dc:creator>Shunchen</dc:creator><description>&lt;p&gt;Hi, vinsibal&lt;/p&gt;
&lt;p&gt;Thanks for your help firstly. I tried that new property VirtualizationMode=&amp;quot;Recycling&amp;quot; in SP1. The result is perfect that the memory usage is cut. &lt;/p&gt;
&lt;p&gt;However, i found another urgent issue while i updated to SP1. If VirtualizationMode is set with &amp;quot;Recycling&amp;quot;, I tried to clear the collection (which binding to the listview's itemssource) and fill it with new items. Then it will throw exception if invoking the ScrollIntoView() of listbox.&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; It can work well with .net 3.5(no sp1)&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; It can work well if VirtualizationMode isn't set with &amp;quot;Recycling&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; It can work well if removing items in collection (which binding to itemssource) one by one instead of clearing it. I means that to call RemoveAt() instead of Clear() .&lt;/p&gt;</description></item><item><title>re: Recycling that Item Container</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#8744355</link><pubDate>Thu, 17 Jul 2008 19:22:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8744355</guid><dc:creator>vinsibal</dc:creator><description>&lt;p&gt;Thanks for all the information. &amp;nbsp;I was able to repro exactly. &amp;nbsp;After some investigation, we found this is a bug in the recycling code. &amp;nbsp;It has been logged and will be addressed in our future release. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Right now it seems that the RemoveAt function is the easiest workaround right now but I will look into this a bit more to see if there is a more intuitive work around. &amp;nbsp;Thanks again for your commetns!&lt;/p&gt;
</description></item><item><title>cheat-sheet to some of the WPF 3.5 SP1 features..</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#8869024</link><pubDate>Fri, 15 Aug 2008 10:42:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8869024</guid><dc:creator>Jaime Rodriguez </dc:creator><description>&lt;p&gt;.NET 3.5 SP1 buzz peaked very early at the beta.&amp;amp;#160; At the time I was immersed in Silverlight, so&lt;/p&gt;
</description></item><item><title>re: Recycling that Item Container</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#9825940</link><pubDate>Thu, 09 Jul 2009 10:27:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9825940</guid><dc:creator>Luke</dc:creator><description>&lt;p&gt;Any news on when Virtualization support will be supported when grouping within the ListView is enabled?&lt;/p&gt;</description></item><item><title>re: Recycling that Item Container</title><link>http://blogs.msdn.com/vinsibal/archive/2008/05/14/recycling-that-item-container.aspx#9864299</link><pubDate>Tue, 11 Aug 2009 15:44:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9864299</guid><dc:creator>vinsibal</dc:creator><description>&lt;p&gt;Luke,&lt;/p&gt;
&lt;p&gt;It is on the list of features for future releases but we do not have any solid dates for when that will be supported. &amp;nbsp;In the meantime you can make use of the workaround that I have a link for here, &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/vinsibal/archive/2008/06/12/grouping-and-virtualization.aspx"&gt;http://blogs.msdn.com/vinsibal/archive/2008/06/12/grouping-and-virtualization.aspx&lt;/a&gt;.&lt;/p&gt;
</description></item></channel></rss>