<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jozef Chúťka&#039;s blog &#187; profiler</title>
	<atom:link href="http://blog.yoz.sk/tag/profiler/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yoz.sk</link>
	<description>My life, my work</description>
	<lastBuildDate>Tue, 31 Jan 2012 12:40:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>The Ultimate Debugging And Profiling</title>
		<link>http://blog.yoz.sk/2010/04/the-ultimate-debugging-and-profiling/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-ultimate-debugging-and-profiling</link>
		<comments>http://blog.yoz.sk/2010/04/the-ultimate-debugging-and-profiling/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 10:13:04 +0000</pubDate>
		<dc:creator>Jozef Chúťka</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debug player]]></category>
		<category><![CDATA[MicroProfiler]]></category>
		<category><![CDATA[PreloadSwf]]></category>
		<category><![CDATA[profile]]></category>
		<category><![CDATA[profiler]]></category>

		<guid isPermaLink="false">http://blog.yoz.sk/?p=1480</guid>
		<description><![CDATA[Yesterday I came across interesting articles from jpauclair. The first one is about Almighty PreloadSWF (mm.cfg attribute to define preloader for any as3 .swf file) and the second about his new Flash Visual Profiler. Long story short, you can debug and profile any ActionScript 3 compiled .swf file on the web (or local) you decide [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.yoz.sk/wp-content/uploads/microprofiler-200x100.png" alt="" title="microprofiler" width="200" height="100" class="alignleft size-medium wp-image-1486" /></p>
<p>Yesterday I came across interesting articles from <a href="http://jpauclair.net/">jpauclair</a>. The first one is about <a href="http://jpauclair.net/2010/02/17/one-swf-to-rule-them-all-the-almighty-preloadswf/">Almighty PreloadSWF</a> (mm.cfg attribute to define preloader for any as3 .swf file) and the second about his new <a href="http://jpauclair.net/2010/04/20/visual-profiler/">Flash Visual Profiler</a>. Long story short, you can debug and profile any ActionScript 3 compiled .swf file on the web (or local) you decide to, for example in <a href="http://demonsterdebugger.com/">De MonsterDebugger</a> (open source debugger for Adobe Flash, Flex and AIR).</p>
<p><span id="more-1480"></span></p>
<p>You can read more about how it works on articles linked in article perex, I am gonna supply just the quick todo list to make this work. Here it is:</p>
<ul>
<li>install <a href="http://www.adobe.com/support/flashplayer/downloads.html">Debug Player</a> (if you do not have one already)</li>
<li>install <a href="http://demonsterdebugger.com/">De MonsterDebugger</a> and run it</li>
<li>download <a href="http://jpauclair-blog.googlecode.com/svn/trunk/Experiment/Preload/bin/MicroProfiler.swf">MicroProfiler.swf</a> to your local drive</li>
<li>make sure the download location (etc. d:/whatever/MicroProfiler.swf) is within <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html">local trusted scope</a></li>
<li>open your mm.cfg (on win XP C:\Documents and Settings\username\mm.cfg) file and add this line
<pre class="brush: plain; title: ; notranslate">PreloadSWF=c:\whatever\MicroProfiler.swf</pre>
</li>
<li>close all tabs using flash player or just restart browser</li>
</ul>
<p>Thats it, thats all. From now on, whenever you visit any site with .swf file compiled in as3, you will see a small MicroProfiler over flash movie. If De MonsterDebugger runs it receives data, it also allows you to change variable values and call functions on the fly. Just cool.</p>
<p><img src="http://blog.yoz.sk/wp-content/uploads/microprofiler.png" alt="" title="microprofiler" width="542" height="272" class="alignnone size-full wp-image-1486" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yoz.sk/2010/04/the-ultimate-debugging-and-profiling/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick tip: [tincan]</title>
		<link>http://blog.yoz.sk/2009/11/quick-tip-tincan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quick-tip-tincan</link>
		<comments>http://blog.yoz.sk/2009/11/quick-tip-tincan/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 10:09:06 +0000</pubDate>
		<dc:creator>Jozef Chúťka</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[profiler]]></category>

		<guid isPermaLink="false">http://blog.yoz.sk/?p=576</guid>
		<description><![CDATA[While using flex app profiling / performance profile, I found out that a lot of cumulative time (>70%) was spent on [tincan] method. After some googling it revealed it is time processing RTMP messages. It includes FMS video/audio traffic, rtmp data services, and remote shared object synchronization. Tincan used to be the code name of [...]]]></description>
			<content:encoded><![CDATA[<p>While using flex app profiling / performance profile, I found out that a lot of cumulative time (>70%) was spent on [tincan] method. After some googling it revealed it is time processing RTMP messages. It includes FMS video/audio traffic, rtmp data services, and remote shared object synchronization.</p>
<p>Tincan used to be the code name of Flash Communication Server 1.0, now known as Flash Media Server.</p>
<p>There are also some more methods logged: [pre-render], [mouseEvent], [enterFrameEvent], [mark], [abc-decode], [verify], [render], [reap], [io], [all-complete], [avm1], [builtins], [execute-queued], [generate], [newclass], [openEvent], [sweep] &#8230; unknown for me for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yoz.sk/2009/11/quick-tip-tincan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex 3 profiling not working (update)</title>
		<link>http://blog.yoz.sk/2009/10/flex-3-profiling-not-working/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flex-3-profiling-not-working</link>
		<comments>http://blog.yoz.sk/2009/10/flex-3-profiling-not-working/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 16:03:53 +0000</pubDate>
		<dc:creator>Jozef Chúťka</dc:creator>
				<category><![CDATA[Flash / Flex]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[debug player]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[mm.cfg]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[PreloadSwf]]></category>
		<category><![CDATA[profiler]]></category>
		<category><![CDATA[web browser]]></category>

		<guid isPermaLink="false">http://blog.yoz.sk/?p=527</guid>
		<description><![CDATA[The profiler is a part of the Flex Builder IDE, that listens for messages from the profiler agent. The profiler agent is a swf launched in parallel to your main swf. It is located in your Flex workspace at .metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf. Your IDE gets this agent to start by editing your mm.cfg and adding a “PreloadSwf” [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>The profiler is a part of the Flex Builder IDE, that listens for messages from the profiler agent. The profiler agent is a swf launched in parallel to your main swf. It is located in your Flex workspace at .metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf. Your IDE gets this agent to start by editing your mm.cfg and adding a “PreloadSwf” line. The agent uses the flash.sampler.* API to gather data on your main swf, and sends it to the IDE using TCP on a preconvened port. This port is 9999 by default, you can change it in Preferences/Flex/Profiler/Connections.</p></blockquote>
<p>If you can not get your profiler working, there are few methods you should try:</p>
<ul>
<li>close all other tabs</li>
<li>install debug player</li>
<li>change browser</li>
<li>change port</li>
<li>disable firewall / antivirus</li>
<li>define PreloadSwf path</li>
<li>localhost / 127.0.0.1</li>
<li>allocate console</li>
<li>ultimate methods (what worked for me)</li>
</ul>
<p><span id="more-527"></span></p>
<h3>Update (Feb 12, 2010): Close all other tabs</h3>
<p>Fastest thing to do is to close all other tabs in your browser, close all other instances of browser and than try profile again.</p>
<h3>Install debug player</h3>
<p>Make sure you have installed <a href="http://www.adobe.com/support/flashplayer/downloads.html">debug version of flash player</a>. Well, you probably have&#8230; so skip this one.</p>
<h3>Change browser</h3>
<p>It may seem to be weird but it works. All browsers (chrome, opera, ff) except for internet explorer use same flash player, switching to any other browser may fix your profiling. You can change browser in flex / window / preferences / general / web browser / use external / add &#8230; </p>
<h3>Change port</h3>
<p>Try change default port (flex / window / preferences / flex / profiler / connections / port number) to something else (7777, 8888), there were reports that simple port change helped to solve problem.</p>
<h3>Disable firewall / antivirus</h3>
<p>Do this on your own, if you are not sure about what you are doing call admin. The aim is to unblock port that is used for profiling. Try disable default windows (os) firewall or make exception. To make exception on your eset smar security use following procedure:</p>
<ul>
<li>Open Smart Security.</li>
<li>If you are in standard mode and do not see a menu in the top right hand corner click Setup->Toggle Advanced Mode.</li>
<li>Click on the ‘Enter entire advanced setup tree…’ link at the bottom.</li>
<li>Click Personal Firewall->Protocol Filtering.</li>
<li>Make sure ‘Enable application protocol content filtering’ is selected.</li>
<li>Below that select Redirect traffic for filtering->HTTP and POP3 ports.</li>
</ul>
<h3>Define PreloadSwf path</h3>
<p>If your IDE does not edit your <strong>mm.cfg</strong> file properly, change PreloadSwf property in manually. This is undocumented, but adding the property manually is reported as working solution. Try add the following line to the file</p>
<pre>PreloadSwf= C:/...flexworkspace/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&#038;port=9999</pre>
<p>If you got the the path to the profile agent wrong. You can check this by looking in the flash text logs. If the preload went wrong, you should see a message like:</p>
<pre>PreloadSwf paths must be local trusted: C:/...flexworkspace/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&#038;port=9999</pre>
<p>Make sure path directs to local trusted area!</p>
<h3>localhost / 127.0.0.1</h3>
<p>If the profiler in Flash Builder does not work, check if localhost does resolve to 127.0.0.1 on your machine. If not fix the hosts file. &#8211; <a href="http://twitter.com/quasimondo">Mario Klingemann (quasimondo)</a></p>
<h3>allocate console</h3>
<p>If the Flash Profiler does not start: switch off &#8220;Allocate Console&#8221; in the Profile Configurations Common tab. &#8211; <a href="http://twitter.com/quasimondo">Mario Klingemann (quasimondo)</a></p>
<h3>Ultimate methods (what worked for me)</h3>
<p>I spent almost hour trying to figure out why my profiler wont connect in one workspace and works just fine in another even with same settings. I tried every mentioned method but niether worked. While randomly trying all methods I finally came to something new:</p>
<blockquote><p>Profiling can only be performed on the debug version of an application.</p></blockquote>
<p>What the hell? Of course I am using debug player and pushing &#8220;profile it&#8221; button so what is wrong? I tried reinstall player to <a href="http://kb2.adobe.com/cps/142/tn_14266.html">other versions</a> but did not worked. Well, if you were able to came this far you may wonder what solution I finally figurd out. It is definitely not elegant solution nor correct but works, thats why I called it ultimate <img src='http://blog.yoz.sk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  . <strong>Click profile button as fast as you can (5 times in row)</strong> and behold! Randomly you get your profile perspective connected and working (if not, try few times)! So definitely a flex bug.</p>
<p>Sources:</p>
<ul>
<li><a href="http://www.grindstonemedia.net/2008/06/29/flex-profiler-connection-problems/">http://www.grindstonemedia.net/2008/06/29/flex-profiler-connection-problems/</a></li>
<li><a href="http://arielsommeria.com/blog/2008/12/22/getting-the-flex-profiler-to-work/">http://arielsommeria.com/blog/2008/12/22/getting-the-flex-profiler-to-work/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.yoz.sk/2009/10/flex-3-profiling-not-working/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

