<?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: Flex optimization tip: ArrayCollection.removeAll() vs. ArrayCollection.source = new Array(). Is this a bug ?</title>
	<atom:link href="http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/</link>
	<description>"I write pretty software"</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:52:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Vitalik Mahara</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-77817</link>
		<dc:creator>Vitalik Mahara</dc:creator>
		<pubDate>Fri, 18 Feb 2011 15:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-77817</guid>
		<description>Hi it&#039;s good article ... as i understand it&#039;s good way to do your program be faster, but not right way to use it ... can some one give answer or reference where i can get answer to question, how use very large arrayCollection ?  i had collection some about 60 000 of simple object .. for looping on them or remove all it&#039;s take to much memory to me ... if there a some way how i can do operation on that kind of arrayCollection or greates ( some about 1 000 000 object inside)  to removeAll , sort,  looping true those nodes ...</description>
		<content:encoded><![CDATA[<p>Hi it&#8217;s good article &#8230; as i understand it&#8217;s good way to do your program be faster, but not right way to use it &#8230; can some one give answer or reference where i can get answer to question, how use very large arrayCollection ?  i had collection some about 60 000 of simple object .. for looping on them or remove all it&#8217;s take to much memory to me &#8230; if there a some way how i can do operation on that kind of arrayCollection or greates ( some about 1 000 000 object inside)  to removeAll , sort,  looping true those nodes &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juanabreu</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-77696</link>
		<dc:creator>Juanabreu</dc:creator>
		<pubDate>Thu, 30 Dec 2010 20:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-77696</guid>
		<description>dude you are my hero. you just easily saved me  20 + hours of work god bless you.</description>
		<content:encoded><![CDATA[<p>dude you are my hero. you just easily saved me  20 + hours of work god bless you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Array Literals</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-76670</link>
		<dc:creator>Array Literals</dc:creator>
		<pubDate>Sun, 19 Sep 2010 21:43:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-76670</guid>
		<description>Use ArrayCollection.source = [] instead of ArrayCollection.source = new Array(); it&#039;s about 3 times faster.

Using Array literals should be about 3 times faster than the Array constructor. See: http://tekkie.flashbit.net/flash/as/actionscript-3-array-constructor-vs-array-literals-benchmark</description>
		<content:encoded><![CDATA[<p>Use ArrayCollection.source = [] instead of ArrayCollection.source = new Array(); it&#8217;s about 3 times faster.</p>
<p>Using Array literals should be about 3 times faster than the Array constructor. See: <a href="http://tekkie.flashbit.net/flash/as/actionscript-3-array-constructor-vs-array-literals-benchmark" rel="nofollow">http://tekkie.flashbit.net/flash/as/actionscript-3-array-constructor-vs-array-literals-benchmark</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: InF3rN0</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-73633</link>
		<dc:creator>InF3rN0</dc:creator>
		<pubDate>Fri, 18 Jun 2010 19:26:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-73633</guid>
		<description>Thanks a lot for this. It was exactly what I was looking for. Very nice way to solve it.

CHeers.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this. It was exactly what I was looking for. Very nice way to solve it.</p>
<p>CHeers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arpit</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-68576</link>
		<dc:creator>arpit</dc:creator>
		<pubDate>Tue, 09 Feb 2010 14:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-68576</guid>
		<description>@RajPrabha
1) obj will only get gc-ed if no other object has added an event listener to it. Make sure nothing else is forcing its existance. 

2)Objects running code like Timers, Enterframe listeners etc cannot be garbage collected until those stop. See http://www.gskinner.com/blog/archives/2006/07/as3_resource_ma_1.html

3)Also note, objects marked for Garbage Collection may not be collected immediately. The Flash Player marks them for collection until the next GC cycle but that may take a few frames.</description>
		<content:encoded><![CDATA[<p>@RajPrabha<br />
1) obj will only get gc-ed if no other object has added an event listener to it. Make sure nothing else is forcing its existance. </p>
<p>2)Objects running code like Timers, Enterframe listeners etc cannot be garbage collected until those stop. See <a href="http://www.gskinner.com/blog/archives/2006/07/as3_resource_ma_1.html" rel="nofollow">http://www.gskinner.com/blog/archives/2006/07/as3_resource_ma_1.html</a></p>
<p>3)Also note, objects marked for Garbage Collection may not be collected immediately. The Flash Player marks them for collection until the next GC cycle but that may take a few frames.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RajPrabha</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-68569</link>
		<dc:creator>RajPrabha</dc:creator>
		<pubDate>Tue, 09 Feb 2010 10:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-68569</guid>
		<description>I am using arrayCollection.source = new array[]. But the old objects are not being garbaget collected. Can anyone please help me? 

var obj:Object = new Object;
obj.name = &quot;something&quot;;
arraycollection.addItem(obj);

after some time,

arraycollection.source = new Arrray();

but &#039;obj&#039;, still exists in memory. Please help me</description>
		<content:encoded><![CDATA[<p>I am using arrayCollection.source = new array[]. But the old objects are not being garbaget collected. Can anyone please help me? </p>
<p>var obj:Object = new Object;<br />
obj.name = &#8220;something&#8221;;<br />
arraycollection.addItem(obj);</p>
<p>after some time,</p>
<p>arraycollection.source = new Arrray();</p>
<p>but &#8216;obj&#8217;, still exists in memory. Please help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Brown</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-61317</link>
		<dc:creator>Chris Brown</dc:creator>
		<pubDate>Fri, 21 Aug 2009 07:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-61317</guid>
		<description>Thanks for this article.
For my project I extended the ArrayCollection class and overrode the removeall() function.

Also, When I called removeAll on and arrayCollection it didn&#039;t seem to dispatch an event, am I missing something? Anyway, in my class I also made it dispatch and event when removeall is called.</description>
		<content:encoded><![CDATA[<p>Thanks for this article.<br />
For my project I extended the ArrayCollection class and overrode the removeall() function.</p>
<p>Also, When I called removeAll on and arrayCollection it didn&#8217;t seem to dispatch an event, am I missing something? Anyway, in my class I also made it dispatch and event when removeall is called.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-52631</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Tue, 24 Mar 2009 20:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-52631</guid>
		<description>I appreciate you blogging this. It helped me solve the same kind of problem. Thanks.</description>
		<content:encoded><![CDATA[<p>I appreciate you blogging this. It helped me solve the same kind of problem. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arpit</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-45392</link>
		<dc:creator>arpit</dc:creator>
		<pubDate>Sat, 27 Sep 2008 22:30:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-45392</guid>
		<description>@Paul,
How many items are you removing at a time? The removeAll() function seems to need some process time that is dependent on the number of items being removed at one time (It basically runs in a for loop removing event listeners which becomes processor intensive for large ArrayCollection objects). If you are removing 10 at a time that should not be a big deal.
Its more likely that you may be removing those objects from the ArrayCollection but these objects aren&#039;t being garbage collected (maybe you have an event listener of your own that is not using weak references), so after a while, just having these objects in memory may cause a performance hit. Try using the Flex profiler to see if the objects are being garbage collected correctly.</description>
		<content:encoded><![CDATA[<p>@Paul,<br />
How many items are you removing at a time? The removeAll() function seems to need some process time that is dependent on the number of items being removed at one time (It basically runs in a for loop removing event listeners which becomes processor intensive for large ArrayCollection objects). If you are removing 10 at a time that should not be a big deal.<br />
Its more likely that you may be removing those objects from the ArrayCollection but these objects aren&#8217;t being garbage collected (maybe you have an event listener of your own that is not using weak references), so after a while, just having these objects in memory may cause a performance hit. Try using the Flex profiler to see if the objects are being garbage collected correctly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.arpitonline.com/blog/2008/02/16/flex-optimization-tip-arraycollectionremoveall-vs-arraycollectionsource-new-array-is-this-a-bug/comment-page-1/#comment-45325</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 25 Sep 2008 10:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.arpitonline.com/blog/?p=114#comment-45325</guid>
		<description>Hi I have an app increases the rows in arraycollection (manually), usually there are only a max of 10 rows added. When the process completes I use Removeall() as discussed. I may be doing this  x 1000 times per session. It has been noted that the application appears to be slowing down after 600 / 700 processes. Does anyone think that the removeAll() function could have a cumalitive effect on the app?</description>
		<content:encoded><![CDATA[<p>Hi I have an app increases the rows in arraycollection (manually), usually there are only a max of 10 rows added. When the process completes I use Removeall() as discussed. I may be doing this  x 1000 times per session. It has been noted that the application appears to be slowing down after 600 / 700 processes. Does anyone think that the removeAll() function could have a cumalitive effect on the app?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

