<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Are there any tricks that will help me improve TreeView&#8217;s performance? &#8211; Part I</title>
	<atom:link href="http://bea.stollnitz.com/blog/?feed=rss2&#038;p=42" rel="self" type="application/rss+xml" />
	<link>http://bea.stollnitz.com/blog/?p=42</link>
	<description>on Silverlight and WPF</description>
	<lastBuildDate>Thu, 22 Jul 2010 20:56:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-113</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Tue, 11 Sep 2007 16:59:39 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-113</guid>
		<description>Hi Laurent,

Yes, that is a good trick.

I&#039;m glad you&#039;re enjoying working with our platform :) Although we have some rough edges, I am overall very proud of what we have accomplished.

Bea</description>
		<content:encoded><![CDATA[<p>Hi Laurent,</p>
<p>Yes, that is a good trick.</p>
<p>I&#8217;m glad you&#8217;re enjoying working with our platform :) Although we have some rough edges, I am overall very proud of what we have accomplished.</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-112</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Tue, 11 Sep 2007 11:43:56 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-112</guid>
		<description>Hi Bea,

Oh yes I know how hard it can be to combine family life, programming as a work, programming as a passion, and additional hobbies :-) 

I am aware of the &quot;reverse binding&quot; (Target To Source&quot;) scenario, but thanks for reminding me. Maybe I can use that in some cases.

In the typical case where I need this, however, I don&#039;t think it&#039;s possible. Typically, I&#039;d like to pass a reference to a FrameworkElement to the converter, so that I can perform a &quot;TryFindResource&quot; on that element. Currently, I am using a MultiBinding to do that, where the first Binding is the FrameworkElement (RelativeSource Self), and the second value is the actual value I want to convert. That&#039;s a neat trick (Thanks Dr WPF...) but it&#039;s just a trick.

Anyway :-) Finding a workaround to these problems has been a very interesting and creative task for me these last weeks, so thank the team for me :-)

Greetings,
Laurent</description>
		<content:encoded><![CDATA[<p>Hi Bea,</p>
<p>Oh yes I know how hard it can be to combine family life, programming as a work, programming as a passion, and additional hobbies :-) </p>
<p>I am aware of the &#8220;reverse binding&#8221; (Target To Source&#8221;) scenario, but thanks for reminding me. Maybe I can use that in some cases.</p>
<p>In the typical case where I need this, however, I don&#8217;t think it&#8217;s possible. Typically, I&#8217;d like to pass a reference to a FrameworkElement to the converter, so that I can perform a &#8220;TryFindResource&#8221; on that element. Currently, I am using a MultiBinding to do that, where the first Binding is the FrameworkElement (RelativeSource Self), and the second value is the actual value I want to convert. That&#8217;s a neat trick (Thanks Dr WPF&#8230;) but it&#8217;s just a trick.</p>
<p>Anyway :-) Finding a workaround to these problems has been a very interesting and creative task for me these last weeks, so thank the team for me :-)</p>
<p>Greetings,<br />
Laurent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-54</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Mon, 10 Sep 2007 15:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-54</guid>
		<description>Hi Laurent,

I appreciate your nice words. I&#039;m planning to starting being more active in my blog. It&#039;s been really hard to manage a more than full time job, an active blog, and a life. However, I really miss writing and plan to do it more often.

Yes, we&#039;ve heard that suggestion before. I explained a partial workaround in &lt;a href=&quot;http://www.beacosta.com/Archive/2006_03_01_bcosta_archive.html&quot; rel=&quot;nofollow&quot;&gt;this &lt;/a&gt;blog post, under the &quot;Binding to methods&quot; section. However, it&#039;s not a complete workaround - it doesn&#039;t work for many common scenarios. 

We would like to support this scenario, but we can&#039;t simply make those properties DPs because that would mean Binding and ObjectDataProvider would have to be DOs. Apart from possibly affecting perf, it would open up many illegal scenarios that would greatly increase our test matrix. We would like to come up with a design that would allow a Binding to depend on data without necessarily allowing it to be data bound. We have a work item to do this, but it will require some cleaver designing.

Thanks a lot for your suggestions!

Bea</description>
		<content:encoded><![CDATA[<p>Hi Laurent,</p>
<p>I appreciate your nice words. I&#8217;m planning to starting being more active in my blog. It&#8217;s been really hard to manage a more than full time job, an active blog, and a life. However, I really miss writing and plan to do it more often.</p>
<p>Yes, we&#8217;ve heard that suggestion before. I explained a partial workaround in <a href="http://www.beacosta.com/Archive/2006_03_01_bcosta_archive.html" rel="nofollow">this </a>blog post, under the &#8220;Binding to methods&#8221; section. However, it&#8217;s not a complete workaround &#8211; it doesn&#8217;t work for many common scenarios. </p>
<p>We would like to support this scenario, but we can&#8217;t simply make those properties DPs because that would mean Binding and ObjectDataProvider would have to be DOs. Apart from possibly affecting perf, it would open up many illegal scenarios that would greatly increase our test matrix. We would like to come up with a design that would allow a Binding to depend on data without necessarily allowing it to be data bound. We have a work item to do this, but it will require some cleaver designing.</p>
<p>Thanks a lot for your suggestions!</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-9</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Sun, 09 Sep 2007 02:24:04 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-9</guid>
		<description>Hi Yuval,

Your thorough comment is very very appreciated! I brought your ideas to my team, and here is what we discussed:

1) You mention that scrolling speed degrades linearly with the number of items displayed. If you want to scroll from item 1 to item 30, the total number of items in your ListBox should not affect perf that much. It will affect a little because of the lack of data virtualization, but since ListBox has UI virtualization, we don&#039;t create wrappers for the items that are not visible. However, if you are constantly scrolling to sections that haven&#039;t been rendered before, then there will be a delay because we need to create the UI wrappers for those items every time you scroll. This is the price we pay to have good initial rendering speed. 
Having said that, I must add that we&#039;ve been investigating possible improvements for this scenario. It&#039;s heard to say at this point whether we&#039;ll be able to improve it or not, but I&#039;m keeping my fingers crossed.

2) That&#039;s a great idea - giving the user the capability to control the latency of the discarding of off-screen items. I&#039;ve already added it to our list of feature ideas for the future. I don&#039;t think we should allow customers to specify the delay in the form of time, but we could certainly allow control about the priority of this operation in the dispatcher queue. You would like the discarding of the items to have a lower priority, and we got feedback recently from another customer that would like that operation to have higher priority. The other customer mentioned to us that, if you keep scrolling up and down very quickly, the non-visible items are not discarded, and the memory consumption keep growing. By giving him an API to increase the priority of the discarding operation, he could adjust the behavior of his scenario. 

3) Actually, we already detect that scenario today, and it&#039;s possible we&#039;ll be able to improve this scenario a little. We are not looking into layout optimizations in particular, we&#039;re mostly researching the implications of recycling containers. But here&#039;s a tip that you can use today: the more fixed widths and heights you have in your elements, the cheaper the layout will be.

4) Actually, this is the first time we hear this. Do you have a specific sample that you can share with us that shows slow keyboard scrolling? We would be happy to run perf tests on your scenario and see if there is anything we can do to improve that.

Thank you so much for your thorough comment! Feedback like yours greatly helps us improve WPF, and make sure that it solves what customers want!

Bea</description>
		<content:encoded><![CDATA[<p>Hi Yuval,</p>
<p>Your thorough comment is very very appreciated! I brought your ideas to my team, and here is what we discussed:</p>
<p>1) You mention that scrolling speed degrades linearly with the number of items displayed. If you want to scroll from item 1 to item 30, the total number of items in your ListBox should not affect perf that much. It will affect a little because of the lack of data virtualization, but since ListBox has UI virtualization, we don&#8217;t create wrappers for the items that are not visible. However, if you are constantly scrolling to sections that haven&#8217;t been rendered before, then there will be a delay because we need to create the UI wrappers for those items every time you scroll. This is the price we pay to have good initial rendering speed.<br />
Having said that, I must add that we&#8217;ve been investigating possible improvements for this scenario. It&#8217;s heard to say at this point whether we&#8217;ll be able to improve it or not, but I&#8217;m keeping my fingers crossed.</p>
<p>2) That&#8217;s a great idea &#8211; giving the user the capability to control the latency of the discarding of off-screen items. I&#8217;ve already added it to our list of feature ideas for the future. I don&#8217;t think we should allow customers to specify the delay in the form of time, but we could certainly allow control about the priority of this operation in the dispatcher queue. You would like the discarding of the items to have a lower priority, and we got feedback recently from another customer that would like that operation to have higher priority. The other customer mentioned to us that, if you keep scrolling up and down very quickly, the non-visible items are not discarded, and the memory consumption keep growing. By giving him an API to increase the priority of the discarding operation, he could adjust the behavior of his scenario. </p>
<p>3) Actually, we already detect that scenario today, and it&#8217;s possible we&#8217;ll be able to improve this scenario a little. We are not looking into layout optimizations in particular, we&#8217;re mostly researching the implications of recycling containers. But here&#8217;s a tip that you can use today: the more fixed widths and heights you have in your elements, the cheaper the layout will be.</p>
<p>4) Actually, this is the first time we hear this. Do you have a specific sample that you can share with us that shows slow keyboard scrolling? We would be happy to run perf tests on your scenario and see if there is anything we can do to improve that.</p>
<p>Thank you so much for your thorough comment! Feedback like yours greatly helps us improve WPF, and make sure that it solves what customers want!</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-10</link>
		<dc:creator>Laurent</dc:creator>
		<pubDate>Sat, 08 Sep 2007 19:37:27 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-10</guid>
		<description>Hi Bea,

It&#039;s great to see you posting again. I have trained quite a few people to WPF lately in my firm, and always mention your blog as *the* place to find information about binding. I unfortunately had to add &quot;but she didn&#039;t post much recently&quot;. Hopefully now I can stop saying this :-)

Side note for the binding team: We really need to be able to bind constructor parameters or method parameters to other elements in XAML. For example something like:

&lt;ObjectDataProvider x:Key=&quot;MyODP&quot;&gt;
&lt;ObjectDataProvider.ConstructorParameters&gt;
&lt;sys:Int32&gt;
&lt;Binding ElementName=&quot;MainWindow&quot; Path=&quot;ActualWidth&quot;/&gt;
&lt;/sys:Int32&gt;
&lt;/ObjectDataProvider.ConstructorParameters&gt;
&lt;/ObjectDataProvider&gt;

Also, why not do ConverterParameter a DP so that we can bind to it:

&lt;Button&gt;
&lt;Binding Source=&quot;{StaticResource Something}&quot;
Path=&quot;MyProperty&quot;
Converter=&quot;{StaticResource MyConverter}&quot;
ConverterParameter=&quot;{Binding ElementName=MyElement, Path=MyValue}&quot;&gt;
&lt;/Binding&gt;
&lt;/Button&gt;

That would be really helpful!

Keep posting :-)
Laurent</description>
		<content:encoded><![CDATA[<p>Hi Bea,</p>
<p>It&#8217;s great to see you posting again. I have trained quite a few people to WPF lately in my firm, and always mention your blog as *the* place to find information about binding. I unfortunately had to add &#8220;but she didn&#8217;t post much recently&#8221;. Hopefully now I can stop saying this :-)</p>
<p>Side note for the binding team: We really need to be able to bind constructor parameters or method parameters to other elements in XAML. For example something like:</p>
<p>&lt;ObjectDataProvider x:Key=&#8221;MyODP&#8221;&gt;<br />
&lt;ObjectDataProvider.ConstructorParameters&gt;<br />
&lt;sys:Int32&gt;<br />
&lt;Binding ElementName=&#8221;MainWindow&#8221; Path=&#8221;ActualWidth&#8221;/&gt;<br />
&lt;/sys:Int32&gt;<br />
&lt;/ObjectDataProvider.ConstructorParameters&gt;<br />
&lt;/ObjectDataProvider&gt;</p>
<p>Also, why not do ConverterParameter a DP so that we can bind to it:</p>
<p>&lt;Button&gt;<br />
&lt;Binding Source=&#8221;{StaticResource Something}&#8221;<br />
Path=&#8221;MyProperty&#8221;<br />
Converter=&#8221;{StaticResource MyConverter}&#8221;<br />
ConverterParameter=&#8221;{Binding ElementName=MyElement, Path=MyValue}&#8221;&gt;<br />
&lt;/Binding&gt;<br />
&lt;/Button&gt;</p>
<p>That would be really helpful!</p>
<p>Keep posting :-)<br />
Laurent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bea</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-7</link>
		<dc:creator>Bea</dc:creator>
		<pubDate>Tue, 04 Sep 2007 13:57:12 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-7</guid>
		<description>Hi Ben,

My tricks are very simple to implement. It is definetely possible to implement really fancy and solid data and UI virtualization custom solutions specific to particular scenarios, but I am not planning to cover that. 

I appreciate your excitement though :)

Bea</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>My tricks are very simple to implement. It is definetely possible to implement really fancy and solid data and UI virtualization custom solutions specific to particular scenarios, but I am not planning to cover that. </p>
<p>I appreciate your excitement though :)</p>
<p>Bea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuval Gilboa</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-8</link>
		<dc:creator>Yuval Gilboa</dc:creator>
		<pubDate>Sat, 01 Sep 2007 19:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-8</guid>
		<description>As always, your post touches an extremely useful topic and is written very clearly. I&#039;m really looking forward for the next two parts of this post. 

I&#039;ve some comments about the performance of the existing VirtualizingStackPanel when used with large data sets. I don&#039;t know what can be done about these problems in the current version, but hopefully you&#039;ll be able to improve on them in the future:

1) Initial rendering speed is fixed and at an acceptable level, but scrolling/repainting speed degrades linearly as the number of items displayed is increased and/or the complexity of the item templates is increased. There is a noticeable delay when the scrollbar is moved to an area that was not previously rendered (the scrollbar thumb lags significantly behind the mouse cursor), and the scrolling experience becomes choppy.

2) I noticed that as long as the user continues scrolling (without releasing the mouse button) and returns to items that were already visited, the scrolling becomes smooth. It seems that the off-screen items that were visited are retained during the scrolling interaction. However, once the user releases the mouse button, all off-screen items are immediately discarded, and on the next scrolling the same choppy behavior will be manifested. I found no programmatic way to control the latency of the discarding of off-screen items, which can be useful in many cases.

3) I also found no programmatic way to inform the VirtualizingStackPanel that all items have uniform display templates (a very common occurrence), which could provide a useful performance optimization hint (similar to the “table-layout:fixed” property that exists in IE/HTML).

4) Scrolling using the keyboard is also considerably slower than I would expect.</description>
		<content:encoded><![CDATA[<p>As always, your post touches an extremely useful topic and is written very clearly. I&#8217;m really looking forward for the next two parts of this post. </p>
<p>I&#8217;ve some comments about the performance of the existing VirtualizingStackPanel when used with large data sets. I don&#8217;t know what can be done about these problems in the current version, but hopefully you&#8217;ll be able to improve on them in the future:</p>
<p>1) Initial rendering speed is fixed and at an acceptable level, but scrolling/repainting speed degrades linearly as the number of items displayed is increased and/or the complexity of the item templates is increased. There is a noticeable delay when the scrollbar is moved to an area that was not previously rendered (the scrollbar thumb lags significantly behind the mouse cursor), and the scrolling experience becomes choppy.</p>
<p>2) I noticed that as long as the user continues scrolling (without releasing the mouse button) and returns to items that were already visited, the scrolling becomes smooth. It seems that the off-screen items that were visited are retained during the scrolling interaction. However, once the user releases the mouse button, all off-screen items are immediately discarded, and on the next scrolling the same choppy behavior will be manifested. I found no programmatic way to control the latency of the discarding of off-screen items, which can be useful in many cases.</p>
<p>3) I also found no programmatic way to inform the VirtualizingStackPanel that all items have uniform display templates (a very common occurrence), which could provide a useful performance optimization hint (similar to the “table-layout:fixed” property that exists in IE/HTML).</p>
<p>4) Scrolling using the keyboard is also considerably slower than I would expect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://bea.stollnitz.com/blog/?p=42&#038;cpage=1#comment-6</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Fri, 31 Aug 2007 19:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://bea.stollnitz.com/blog/?p=42#comment-6</guid>
		<description>I&#039;ve been dealing a lot with custom UI virtualization on hierarchical data the past few days, and would like to see what kind of stuff you come up with. I&#039;m also interested in the data virtualization part. Can&#039;t wait!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been dealing a lot with custom UI virtualization on hierarchical data the past few days, and would like to see what kind of stuff you come up with. I&#8217;m also interested in the data virtualization part. Can&#8217;t wait!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
