<?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: Custom Binding Released!</title>
	<atom:link href="http://www.xtyler.com/code/177/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xtyler.com/code/177</link>
	<description>a developer's blog.</description>
	<lastBuildDate>Wed, 10 Mar 2010 05:54:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: xtyler</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11843</link>
		<dc:creator>xtyler</dc:creator>
		<pubDate>Wed, 26 Aug 2009 15:31:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11843</guid>
		<description>Quote from cited article:

&quot;so it looks like just adding that conditional statement to check for the event listener is kind of expensive.  But it&#039;s only a 2x performance hit instead of ~7-8x for dispatching an unnecessary event...&quot;

&lt;em&gt;Most&lt;/em&gt; events go unlistened to, considering all the property changes and other events on all DisplayObjects and EventDispatcher&#039;s in the system. This check saves significantly in overall performance of any system, while its minimal cost goes unnoticed.</description>
		<content:encoded><![CDATA[<p>Quote from cited article:</p>
<p>&#8220;so it looks like just adding that conditional statement to check for the event listener is kind of expensive.  But it&#8217;s only a 2x performance hit instead of ~7-8x for dispatching an unnecessary event&#8230;&#8221;</p>
<p><em>Most</em> events go unlistened to, considering all the property changes and other events on all DisplayObjects and EventDispatcher&#8217;s in the system. This check saves significantly in overall performance of any system, while its minimal cost goes unnoticed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viatropos</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11842</link>
		<dc:creator>viatropos</dc:creator>
		<pubDate>Wed, 26 Aug 2009 06:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11842</guid>
		<description>Here&#039;s some stats on the performance increases of just adding that &quot;hasEventListener&quot; business.

http://forums.adobe.com/message/2204490#2204490

Cheers,
Lance</description>
		<content:encoded><![CDATA[<p>Here&#8217;s some stats on the performance increases of just adding that &#8220;hasEventListener&#8221; business.</p>
<p><a href="http://forums.adobe.com/message/2204490#2204490" rel="nofollow">http://forums.adobe.com/message/2204490#2204490</a></p>
<p>Cheers,<br />
Lance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xtyler</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11841</link>
		<dc:creator>xtyler</dc:creator>
		<pubDate>Mon, 24 Aug 2009 15:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11841</guid>
		<description>Current Flight binding &lt;em&gt;does not&lt;/em&gt; have a &quot;suspend binding&quot; feature. &lt;em&gt;But&lt;/em&gt; if nothing is bound to a property then the &lt;code&gt;propertyChange&lt;/code&gt; event is never created and dispatched. This is one of the best system-wide improvements over Adobe&#039;s binding, where instantiating a new object, the event, and then dispatching can add up.

Recently I&#039;ve been interested in revisiting the binding solution with a completely new method of updating bindings outside of the event flow. This means that any object could be bindable, not just IEventDispatchers, and it would also mean further speed improvements. The only downside to a new solution like this is that it wouldn&#039;t be compatible with Flex at all, where the current binding is seamless.

Overall I &lt;em&gt;think&lt;/em&gt; tweening performance issues stem from the Flex invalidation cycle. Binding in Flex isn&#039;t slow enough to be noticeable unless you&#039;re doing many thousands of property changes in the same thread. Of course that is only taking the binding system into account, not any of the Flex code that responds to some of these property changes.</description>
		<content:encoded><![CDATA[<p>Current Flight binding <em>does not</em> have a &#8220;suspend binding&#8221; feature. <em>But</em> if nothing is bound to a property then the <code>propertyChange</code> event is never created and dispatched. This is one of the best system-wide improvements over Adobe&#8217;s binding, where instantiating a new object, the event, and then dispatching can add up.</p>
<p>Recently I&#8217;ve been interested in revisiting the binding solution with a completely new method of updating bindings outside of the event flow. This means that any object could be bindable, not just IEventDispatchers, and it would also mean further speed improvements. The only downside to a new solution like this is that it wouldn&#8217;t be compatible with Flex at all, where the current binding is seamless.</p>
<p>Overall I <em>think</em> tweening performance issues stem from the Flex invalidation cycle. Binding in Flex isn&#8217;t slow enough to be noticeable unless you&#8217;re doing many thousands of property changes in the same thread. Of course that is only taking the binding system into account, not any of the Flex code that responds to some of these property changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viatropos</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11840</link>
		<dc:creator>viatropos</dc:creator>
		<pubDate>Mon, 24 Aug 2009 04:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11840</guid>
		<description>One more thing: Binding and Tweening.  Animations run in Flash/pure Actionscript are MUCH faster/smoother than the SAME animations run in Flex.  This is presumably from both Binding and invalidation calls.

For example, if you tween &quot;alpha&quot;, &quot;x&quot;, and &quot;y&quot; of a 500x500 Panel for 1 second, that can dispatch 50+ events, plus make a billion invalidation calls.  If you do &quot;setActualSize&quot; for resizing (which they recommend), that&#039;s another 3 events, so you can have in a single tween: &#039;alphaChanged&#039;, &#039;xChanged&#039;, &#039;yChanged&#039;, &#039;widthChanged&#039;, &#039;heightChanged&#039;, &#039;resize&#039;... every frame!  On most computers other than the newest newest, or the ones we soup up, they chop through 2-4 frames of the animation.  Terrible.  I think it&#039;s from all the binding going on which you don&#039;t need.

Question is, is Flight ready to handle that problem?  It seems like it just about is, if you could put in there a &quot;suspendBinding&quot; method that we could set when running our effects and tweens, that would suspend binding events temporarily.  That way I can run animations with zero binding events (when I don&#039;t want them, which is almost always), and zero invalidation calls (some of the time).

Any thoughts?
Lance</description>
		<content:encoded><![CDATA[<p>One more thing: Binding and Tweening.  Animations run in Flash/pure Actionscript are MUCH faster/smoother than the SAME animations run in Flex.  This is presumably from both Binding and invalidation calls.</p>
<p>For example, if you tween &#8220;alpha&#8221;, &#8220;x&#8221;, and &#8220;y&#8221; of a 500&#215;500 Panel for 1 second, that can dispatch 50+ events, plus make a billion invalidation calls.  If you do &#8220;setActualSize&#8221; for resizing (which they recommend), that&#8217;s another 3 events, so you can have in a single tween: &#8216;alphaChanged&#8217;, &#8216;xChanged&#8217;, &#8216;yChanged&#8217;, &#8216;widthChanged&#8217;, &#8216;heightChanged&#8217;, &#8216;resize&#8217;&#8230; every frame!  On most computers other than the newest newest, or the ones we soup up, they chop through 2-4 frames of the animation.  Terrible.  I think it&#8217;s from all the binding going on which you don&#8217;t need.</p>
<p>Question is, is Flight ready to handle that problem?  It seems like it just about is, if you could put in there a &#8220;suspendBinding&#8221; method that we could set when running our effects and tweens, that would suspend binding events temporarily.  That way I can run animations with zero binding events (when I don&#8217;t want them, which is almost always), and zero invalidation calls (some of the time).</p>
<p>Any thoughts?<br />
Lance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xtyler</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11834</link>
		<dc:creator>xtyler</dc:creator>
		<pubDate>Tue, 21 Jul 2009 15:23:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11834</guid>
		<description>There have been enough changes/improvements since this post that I&#039;ll write an update on this topic and provide some tests and statistics. I don&#039;t think you&#039;ll see a huge difference, especially over a trivial 1000 items. The Flex binding is still fast, coded on AS3, but it uses more memory and isn&#039;t weak-referenced (Garbage Collection Friendly). Both solutions are tied into the Event Dispatching system.</description>
		<content:encoded><![CDATA[<p>There have been enough changes/improvements since this post that I&#8217;ll write an update on this topic and provide some tests and statistics. I don&#8217;t think you&#8217;ll see a huge difference, especially over a trivial 1000 items. The Flex binding is still fast, coded on AS3, but it uses more memory and isn&#8217;t weak-referenced (Garbage Collection Friendly). Both solutions are tied into the Event Dispatching system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viatropos</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11832</link>
		<dc:creator>viatropos</dc:creator>
		<pubDate>Mon, 13 Jul 2009 00:00:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11832</guid>
		<description>Hey man,

How much faster/better performing is this custom binding than traditional Flex binding?  2x, 5x, 10x?  If I have 1000 items in an ArrayCollection all changing values at once, will it prevent the application from temporarily freezing?

Thanks for the info,
Lance</description>
		<content:encoded><![CDATA[<p>Hey man,</p>
<p>How much faster/better performing is this custom binding than traditional Flex binding?  2x, 5x, 10x?  If I have 1000 items in an ArrayCollection all changing values at once, will it prevent the application from temporarily freezing?</p>
<p>Thanks for the info,<br />
Lance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Collett</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11724</link>
		<dc:creator>Martin Collett</dc:creator>
		<pubDate>Thu, 28 May 2009 08:39:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11724</guid>
		<description>Brilliant, thank you - fixed. I think I filled in the xmlns myself first, didn&#039;t give Flex a chance to do it for me - will watch out for that next time.
I&#039;ll let you know how I get on, Bind looks to be eactly what I need. I have a windowing app that crashes due to Binding causing massive memory leaks when I open and close windows,
Thanks again, Martin</description>
		<content:encoded><![CDATA[<p>Brilliant, thank you &#8211; fixed. I think I filled in the xmlns myself first, didn&#8217;t give Flex a chance to do it for me &#8211; will watch out for that next time.<br />
I&#8217;ll let you know how I get on, Bind looks to be eactly what I need. I have a windowing app that crashes due to Binding causing massive memory leaks when I open and close windows,<br />
Thanks again, Martin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xtyler</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11719</link>
		<dc:creator>xtyler</dc:creator>
		<pubDate>Wed, 27 May 2009 17:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11719</guid>
		<description>Martin,

The xml namespace is xmlns:flight=&quot;http://flight.flightxd.com/2009&quot;

It&#039;s &lt;em&gt;supposed to&lt;/em&gt; auto-complete for you in the Flex Builder environment, sorry if it&#039;s given you much trouble.

Let me know if that works for you.</description>
		<content:encoded><![CDATA[<p>Martin,</p>
<p>The xml namespace is xmlns:flight=&#8221;http://flight.flightxd.com/2009&#8243;</p>
<p>It&#8217;s <em>supposed to</em> auto-complete for you in the Flex Builder environment, sorry if it&#8217;s given you much trouble.</p>
<p>Let me know if that works for you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Collett</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11717</link>
		<dc:creator>Martin Collett</dc:creator>
		<pubDate>Wed, 27 May 2009 13:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11717</guid>
		<description>ah - the xml got stripped out of the error message in my post, replaced with underscores below:
Could not resolve _flight:Bind_ to a component implementation
Thanks</description>
		<content:encoded><![CDATA[<p>ah &#8211; the xml got stripped out of the error message in my post, replaced with underscores below:<br />
Could not resolve _flight:Bind_ to a component implementation<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Collett</title>
		<link>http://www.xtyler.com/code/177/comment-page-1#comment-11716</link>
		<dc:creator>Martin Collett</dc:creator>
		<pubDate>Wed, 27 May 2009 13:46:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.xtyler.com/?p=177#comment-11716</guid>
		<description>I seem to be having trouble sorting my namespaces out - I&#039;m getting an error &#039;could not resolve  to a component implementation. I&#039;ve added &#039;xmlns:flight=&quot;flight.*&quot;&#039; to my top level tag (TitleWindow) and I have flight-framework.swc in my libs folder - any ideas? I&#039;m just trying to use Bind at this point, not the whole framework.
Regards, Martin</description>
		<content:encoded><![CDATA[<p>I seem to be having trouble sorting my namespaces out &#8211; I&#8217;m getting an error &#8216;could not resolve  to a component implementation. I&#8217;ve added &#8216;xmlns:flight=&#8221;flight.*&#8221;&#8216; to my top level tag (TitleWindow) and I have flight-framework.swc in my libs folder &#8211; any ideas? I&#8217;m just trying to use Bind at this point, not the whole framework.<br />
Regards, Martin</p>
]]></content:encoded>
	</item>
</channel>
</rss>
