<?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: An AS3 profiler</title>
	<atom:link href="http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/feed/" rel="self" type="application/rss+xml" />
	<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/</link>
	<description></description>
	<lastBuildDate>Fri, 19 Mar 2010 20:31:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Aaron</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11888</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Sun, 17 May 2009 06:41:29 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11888</guid>
		<description>This is a great tool :)

I have been looking for a profiling tool for flash for a while.

I&#039;m making a game which is becoming pretty large in terms of LOC and this is going to be invaluable in improving performance. =D</description>
		<content:encoded><![CDATA[<p>This is a great tool :)</p>
<p>I have been looking for a profiling tool for flash for a while.</p>
<p>I&#8217;m making a game which is becoming pretty large in terms of LOC and this is going to be invaluable in improving performance. =D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Annie</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11282</link>
		<dc:creator>Annie</dc:creator>
		<pubDate>Thu, 16 Apr 2009 02:40:14 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11282</guid>
		<description>Hi again,

I have another question, now I can use the profiler to test code fragment, how can I use it to test functions or classes?

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi again,</p>
<p>I have another question, now I can use the profiler to test code fragment, how can I use it to test functions or classes?</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Annie</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11281</link>
		<dc:creator>Annie</dc:creator>
		<pubDate>Thu, 16 Apr 2009 01:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11281</guid>
		<description>sorry, I used Flash CS4 this time, it works. thanks.</description>
		<content:encoded><![CDATA[<p>sorry, I used Flash CS4 this time, it works. thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Annie</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11275</link>
		<dc:creator>Annie</dc:creator>
		<pubDate>Wed, 15 Apr 2009 20:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11275</guid>
		<description>Hi Manuel, 

When I used the demo, I met one error:

TypeError: Error #1007: Instantiation attempted on a non-constructor.
	at profiler::ProfilerResources$/createFixedTextField()
	at profiler::Profiler$iinit()
	at demo$iinit()

The problem is the following line:
private static const fixedFont: Class;

I made fixedFont a class:

package profiler {

    import flash.text.Font;

   [ Embed( source = &#039;assets/fleftex.ttf&#039;, fontName = &#039;fixedFont&#039;, mimeType = &#039;application/x-font-truetype&#039; ) ]
    public class fixedFont extends Font {}

}


and delete:

[ Embed( source = &#039;assets/fleftex.ttf&#039;, fontName = &#039;fixedFont&#039;, mimeType = &#039;application/x-font-truetype&#039; ) ]
			private static const fixedFont: Class;

in ProfilerResources.as.

Then the error disappeared.

But when I run it, I can only see the graph, I can not see any words on the swf.

I dont know why.

sorry ,maybe my question is a litter stupid .I am the AS3 beginner.</description>
		<content:encoded><![CDATA[<p>Hi Manuel, </p>
<p>When I used the demo, I met one error:</p>
<p>TypeError: Error #1007: Instantiation attempted on a non-constructor.<br />
	at profiler::ProfilerResources$/createFixedTextField()<br />
	at profiler::Profiler$iinit()<br />
	at demo$iinit()</p>
<p>The problem is the following line:<br />
private static const fixedFont: Class;</p>
<p>I made fixedFont a class:</p>
<p>package profiler {</p>
<p>    import flash.text.Font;</p>
<p>   [ Embed( source = 'assets/fleftex.ttf', fontName = 'fixedFont', mimeType = 'application/x-font-truetype' ) ]<br />
    public class fixedFont extends Font {}</p>
<p>}</p>
<p>and delete:</p>
<p>[ Embed( source = 'assets/fleftex.ttf', fontName = 'fixedFont', mimeType = 'application/x-font-truetype' ) ]<br />
			private static const fixedFont: Class;</p>
<p>in ProfilerResources.as.</p>
<p>Then the error disappeared.</p>
<p>But when I run it, I can only see the graph, I can not see any words on the swf.</p>
<p>I dont know why.</p>
<p>sorry ,maybe my question is a litter stupid .I am the AS3 beginner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manuel</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11067</link>
		<dc:creator>Manuel</dc:creator>
		<pubDate>Wed, 01 Apr 2009 11:53:32 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11067</guid>
		<description>Cool thing you can actually debug non-Flex builder projects, i didn&#039;t know that: i used the Flex profiler in the past when i was working at &lt;a href=&quot;http://jooce.com&quot; rel=&quot;nofollow&quot;&gt;Jooce&lt;/a&gt;, indeed it&#039;s a great tool for debugging flash-based applications, especially for looking at memory leaks and observing the garbage collector cycle.
Thank you for sharing it, nice tip worth to mention!</description>
		<content:encoded><![CDATA[<p>Cool thing you can actually debug non-Flex builder projects, i didn&#8217;t know that: i used the Flex profiler in the past when i was working at <a href="http://jooce.com" rel="nofollow">Jooce</a>, indeed it&#8217;s a great tool for debugging flash-based applications, especially for looking at memory leaks and observing the garbage collector cycle.<br />
Thank you for sharing it, nice tip worth to mention!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HybridMind</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11066</link>
		<dc:creator>HybridMind</dc:creator>
		<pubDate>Wed, 01 Apr 2009 11:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11066</guid>
		<description>Manuel,

Thank you so much for the reply!  Everything you mention makes good sense so thanks for the clarifications.  Yes, after studying the code a bit more I see how it wouldn&#039;t be that hard to add that functionality I was requesting.  I have also been using the ability of flex builder 3 to profile an external flash application that has been quite nice as well.  It isn&#039;t really an option for people that don&#039;t have flex, but for those that do it gives some great output.  Are you familiar with that at all?  I discovered &lt;a href=&quot;http://www.zedia.net/2008/using-the-flex-profiler-with-a-flash-website-or-application/&quot; rel=&quot;nofollow&quot;&gt;this link here&lt;/a&gt; that has info on a presentation and the simple steps to get it working.  Just thought I&#039;d share in case you or others were curious about using some of the low level tools available in Flex.  Anyway, thanks again for your software!</description>
		<content:encoded><![CDATA[<p>Manuel,</p>
<p>Thank you so much for the reply!  Everything you mention makes good sense so thanks for the clarifications.  Yes, after studying the code a bit more I see how it wouldn&#8217;t be that hard to add that functionality I was requesting.  I have also been using the ability of flex builder 3 to profile an external flash application that has been quite nice as well.  It isn&#8217;t really an option for people that don&#8217;t have flex, but for those that do it gives some great output.  Are you familiar with that at all?  I discovered <a href="http://www.zedia.net/2008/using-the-flex-profiler-with-a-flash-website-or-application/" rel="nofollow">this link here</a> that has info on a presentation and the simple steps to get it working.  Just thought I&#8217;d share in case you or others were curious about using some of the low level tools available in Flex.  Anyway, thanks again for your software!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manuel</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11010</link>
		<dc:creator>Manuel</dc:creator>
		<pubDate>Sat, 28 Mar 2009 20:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11010</guid>
		<description>Hi Hybrid,

	if you don&#039;t mind i&#039;ll respond to your questions publicly so that other people may find that useful.
Before responding, you may want to know beforehand that this tool was adapted to work in AS3, but i originally developed it for profiling the framework i was working on and the application i needed to profile was exactly a game, so it seems our needs are quite related to each other one ;)
As for your questions, here we go:

1) indeed you&#039;ll be more comfortable in wrapping deeper-level calls in a singly-rooted one-node call that can embrace all of your deeper calls. For instance, the game i was profiling was a tick-based event system (a quite common one): the main &quot;onTick&quot; function was being called once for every frame, say 32 times per second, and it was dispatching the tick event all along the chain of objects i had.
As soon as you enter the &quot;onTick&quot; call you want to &quot;beginProfiling&quot;, perform your operations and then &quot;endProfiling&quot; as soon as you exit the function.
Now that you are basically timing every frame from start to finish, you may want to time more deeper, slicing the original root via begin/end: you have to be sure the slices you define (begin/end) are common to the same root or your results will end up to be partial or cumulative and not related as they should.
The &quot;onTick&quot; function i&#039;m talking about can be perfectly seen as the AS3&#039;s &quot;onEnterFrame&quot; event, you just have to make sure everything live and die between every call: profiling code that lies outside that is another matter, you just can&#039;t relate it to useful values since you can&#039;t have a common root for that: you can, however, process asynchronous events in your &quot;tick&quot; call, so that async-calls just modify some data that you actually &quot;look-at&quot; it just once per frame. If you want more information on that we may switch to private mail, just let me know.

2) i should have specified that in the sources, the number you specify is basically the number of frames you want to accumulate data from before computing stats: although generally &quot;the more the better&quot;, i personally settled on the fps you are actually updating everything so that whenever i look at the stats i&#039;m in fact looking to the performance of the computations performed in the last elapsed second.

3) that&#039;s what i always wanted to add and never had the time to implement it: it shouldn&#039;t be hard to hack those into the profiler, most of the data is already there, you&#039;ll just have to hack around the rendering, feel free to do any hack you want to it, in fact i really encourage you to do it: if you are writing a game you&#039;ll be surely able to find your way into the Profiler and add what you need.

Thank you for using it and (possibly) enhance it!</description>
		<content:encoded><![CDATA[<p>Hi Hybrid,</p>
<p>	if you don&#8217;t mind i&#8217;ll respond to your questions publicly so that other people may find that useful.<br />
Before responding, you may want to know beforehand that this tool was adapted to work in AS3, but i originally developed it for profiling the framework i was working on and the application i needed to profile was exactly a game, so it seems our needs are quite related to each other one ;)<br />
As for your questions, here we go:</p>
<p>1) indeed you&#8217;ll be more comfortable in wrapping deeper-level calls in a singly-rooted one-node call that can embrace all of your deeper calls. For instance, the game i was profiling was a tick-based event system (a quite common one): the main &#8220;onTick&#8221; function was being called once for every frame, say 32 times per second, and it was dispatching the tick event all along the chain of objects i had.<br />
As soon as you enter the &#8220;onTick&#8221; call you want to &#8220;beginProfiling&#8221;, perform your operations and then &#8220;endProfiling&#8221; as soon as you exit the function.<br />
Now that you are basically timing every frame from start to finish, you may want to time more deeper, slicing the original root via begin/end: you have to be sure the slices you define (begin/end) are common to the same root or your results will end up to be partial or cumulative and not related as they should.<br />
The &#8220;onTick&#8221; function i&#8217;m talking about can be perfectly seen as the AS3&#8242;s &#8220;onEnterFrame&#8221; event, you just have to make sure everything live and die between every call: profiling code that lies outside that is another matter, you just can&#8217;t relate it to useful values since you can&#8217;t have a common root for that: you can, however, process asynchronous events in your &#8220;tick&#8221; call, so that async-calls just modify some data that you actually &#8220;look-at&#8221; it just once per frame. If you want more information on that we may switch to private mail, just let me know.</p>
<p>2) i should have specified that in the sources, the number you specify is basically the number of frames you want to accumulate data from before computing stats: although generally &#8220;the more the better&#8221;, i personally settled on the fps you are actually updating everything so that whenever i look at the stats i&#8217;m in fact looking to the performance of the computations performed in the last elapsed second.</p>
<p>3) that&#8217;s what i always wanted to add and never had the time to implement it: it shouldn&#8217;t be hard to hack those into the profiler, most of the data is already there, you&#8217;ll just have to hack around the rendering, feel free to do any hack you want to it, in fact i really encourage you to do it: if you are writing a game you&#8217;ll be surely able to find your way into the Profiler and add what you need.</p>
<p>Thank you for using it and (possibly) enhance it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HybridMind</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11007</link>
		<dc:creator>HybridMind</dc:creator>
		<pubDate>Sat, 28 Mar 2009 16:30:53 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11007</guid>
		<description>So, I&#039;ve been using this a bunch now and have a few questions if you have time to respond:

First, I have followed your demo code to learn how to use it in the context of a larger application, a game in this instance.  

1) When using this tool to test out the performance of a game do you recommend making the calls to &#039;prof.beginProfiling();&#039; and &#039;prof.endProfiling();&#039; at a higher level and in a central location (like an enter frame event etc) so that they are opened and closed once per frame while you may have many other calls to individual tests with &#039;prof.begin(&quot;blah&quot;);&#039; &#039;prof.end(&quot;blah&quot;);&#039; at lower levels that it accumulates data from?

2) Should the initial call to prof = new Profiler( x ) have x = FPS of your game fla?

3) I see that in the code for the profiler there are statistics tracking of min and max times.  I have read the code and see how you are using it in certain areas and in the displaying of the min/max bar graphics options via optional ProfilerConfig.showMinMax call, but would love to be able to add a max column number to the output because while I am testing my app on the fly it isn&#039;t as useful when the time data keeps dropping to 0ms when I&#039;m not actively in the test being tested.  I need to be able to see my max times or avg times at least over the duration of a program to make educated guesses as to where to improve it. With this context in mind, is this already supported and I just don&#039;t see it?  Is this something that you feel wouldn&#039;t be too hard for me to hack in there?  I just wanted to see if you had any recommendations on how it would be done as the author before I dove into your code to hack it up for myself.  :)

Thanks again, I&#039;m having a blast using this program and getting some good data from my game performance!</description>
		<content:encoded><![CDATA[<p>So, I&#8217;ve been using this a bunch now and have a few questions if you have time to respond:</p>
<p>First, I have followed your demo code to learn how to use it in the context of a larger application, a game in this instance.  </p>
<p>1) When using this tool to test out the performance of a game do you recommend making the calls to &#8216;prof.beginProfiling();&#8217; and &#8216;prof.endProfiling();&#8217; at a higher level and in a central location (like an enter frame event etc) so that they are opened and closed once per frame while you may have many other calls to individual tests with &#8216;prof.begin(&#8220;blah&#8221;);&#8217; &#8216;prof.end(&#8220;blah&#8221;);&#8217; at lower levels that it accumulates data from?</p>
<p>2) Should the initial call to prof = new Profiler( x ) have x = FPS of your game fla?</p>
<p>3) I see that in the code for the profiler there are statistics tracking of min and max times.  I have read the code and see how you are using it in certain areas and in the displaying of the min/max bar graphics options via optional ProfilerConfig.showMinMax call, but would love to be able to add a max column number to the output because while I am testing my app on the fly it isn&#8217;t as useful when the time data keeps dropping to 0ms when I&#8217;m not actively in the test being tested.  I need to be able to see my max times or avg times at least over the duration of a program to make educated guesses as to where to improve it. With this context in mind, is this already supported and I just don&#8217;t see it?  Is this something that you feel wouldn&#8217;t be too hard for me to hack in there?  I just wanted to see if you had any recommendations on how it would be done as the author before I dove into your code to hack it up for myself.  :)</p>
<p>Thanks again, I&#8217;m having a blast using this program and getting some good data from my game performance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HybridMind</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-11005</link>
		<dc:creator>HybridMind</dc:creator>
		<pubDate>Sat, 28 Mar 2009 15:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-11005</guid>
		<description>Wow!  This tool is just what I was looking for.  It took some googling and you were near the bottom of the first page, but I&#039;m glad I kept checking out the links to find this.

Thank you very much for releasing this to the as3 community.</description>
		<content:encoded><![CDATA[<p>Wow!  This tool is just what I was looking for.  It took some googling and you were near the bottom of the first page, but I&#8217;m glad I kept checking out the links to find this.</p>
<p>Thank you very much for releasing this to the as3 community.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nathan</title>
		<link>http://manuel.bit-fire.com/2007/10/17/an-as3-profiler/comment-page-1/#comment-10582</link>
		<dc:creator>nathan</dc:creator>
		<pubDate>Fri, 06 Feb 2009 15:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://manuel.bit-fire.com/?p=72#comment-10582</guid>
		<description>Thanks for this, very nice!</description>
		<content:encoded><![CDATA[<p>Thanks for this, very nice!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
