Re: Profiling HaXe SWF

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

wvxvw
Hi. Had anyone tried to profile HaXe SWF in Flex (Flash) Builder profiler, or do you have / know of any tools to get all the same basic information on number of instances created / destroyed / persisting in memory?
BTW, steering offtopic :) I heard that FDT were going to build their own profiler... T_T

Best.

Oleg

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

gershon
hi, well, i have this silly haxe class, fairly simple profiling... gprof style flat output, no call graph or anything...
http://code.google.com/p/haxegui/source/browse/trunk/haxegui/Profiler.hx

used like:
function() .. {
Profiler.begin(here.className.split(".").pop()+"."+here.methodName);
...
haxegui.Profiler.end();
}
only haxegui there is really in show(), other code should work independently i think...

here's the output of Profiler.print:
Uptime: 00:00:09
[Class.methodName                ]    [% Time]    [ Calls ]    [Tot. Time]    [Self Time]

[DefaultStyle.getTextFormat      ]    [0.110%]    [    123]    [0.003000s]    [0.000024s]
[Component.nextSibling           ]    [0.049%]    [    113]    [0.000999s]    [0.000008s]
[ListItem.onParentResize         ]    [0.049%]    [     45]    [0.001000s]    [0.000022s]
[Component.init                  ]    [0.662%]    [    291]    [0.017999s]    [0.000061s]
[Container.onParentResize        ]    [    0%]    [    291]    [       0s]    [       0s]
[ScrollBar.adjust                ]    [0.069%]    [      3]    [0.000999s]    [0.000333s]
[Component.moveTo                ]    [0.331%]    [    558]    [0.009000s]    [0.000016s]



On Sun, Mar 14, 2010 at 2:06 PM, Oleg Sivokon <[hidden email]> wrote:
Hi. Had anyone tried to profile HaXe SWF in Flex (Flash) Builder profiler, or do you have / know of any tools to get all the same basic information on number of instances created / destroyed / persisting in memory?
BTW, steering offtopic :) I heard that FDT were going to build their own profiler... T_T

Best.

Oleg

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

wvxvw
In reply to this post by wvxvw
Hi.
Thanks for the info. Nice thing, I'm actually yet to discover how haxe.Timer works on flash platform. Did you try to look into flash.profiler.* package? It may provide a little bit more info than this. I think I should've clarified, I was more interested in memory profiling then performance profiling :)
Another thing - I tried to run HaXe SWF in Flash Bulder 4 profiler (the latest available build), and the profiler simply fails to connect with no error message. Maybe someone more knowledgeable then me could tell what would exactly be the difference? If that's something particularly HaXe related, then maybe it's a lost case, but if that's something that alchemy generated code would also suffer from, then, maybe I could at least try and add task / enhancement for Adobe profiler? Would you see it as at all possible to use Adobe profiler for profiling HaXe code?
Thanks.

Oleg

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

Jake Lewis
be sure to include both of these in your haxe command line build
-D fdb 
-debug
and it work in flex profiler.
Jake

On Mon, Mar 15, 2010 at 7:24 AM, Oleg Sivokon <[hidden email]> wrote:
Hi.
Thanks for the info. Nice thing, I'm actually yet to discover how haxe.Timer works on flash platform. Did you try to look into flash.profiler.* package? It may provide a little bit more info than this. I think I should've clarified, I was more interested in memory profiling then performance profiling :)
Another thing - I tried to run HaXe SWF in Flash Bulder 4 profiler (the latest available build), and the profiler simply fails to connect with no error message. Maybe someone more knowledgeable then me could tell what would exactly be the difference? If that's something particularly HaXe related, then maybe it's a lost case, but if that's something that alchemy generated code would also suffer from, then, maybe I could at least try and add task / enhancement for Adobe profiler? Would you see it as at all possible to use Adobe profiler for profiling HaXe code?
Thanks.

Oleg

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

Cauê W.
But how do you load the swf as an external swf for the profiler? I could only get it to work with an open flex project, and it compiles every time you call the profiler

2010/3/15 Jake Lewis <[hidden email]>
be sure to include both of these in your haxe command line build
-D fdb 
-debug
and it work in flex profiler.
Jake

On Mon, Mar 15, 2010 at 7:24 AM, Oleg Sivokon <[hidden email]> wrote:
Hi.
Thanks for the info. Nice thing, I'm actually yet to discover how haxe.Timer works on flash platform. Did you try to look into flash.profiler.* package? It may provide a little bit more info than this. I think I should've clarified, I was more interested in memory profiling then performance profiling :)
Another thing - I tried to run HaXe SWF in Flash Bulder 4 profiler (the latest available build), and the profiler simply fails to connect with no error message. Maybe someone more knowledgeable then me could tell what would exactly be the difference? If that's something particularly HaXe related, then maybe it's a lost case, but if that's something that alchemy generated code would also suffer from, then, maybe I could at least try and add task / enhancement for Adobe profiler? Would you see it as at all possible to use Adobe profiler for profiling HaXe code?
Thanks.

Oleg

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

Jan_Flanders


On Mon, Mar 15, 2010 at 7:23 PM, Cauê Waneck <[hidden email]> wrote:
But how do you load the swf as an external swf for the profiler? I could only get it to work with an open flex project, and it compiles every time you call the profiler

see Profiling external applications.

http://livedocs.adobe.com/flex/3/html/help.html?content=profiler_4.html#230962

Jan

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

wvxvw
In reply to this post by wvxvw
Jake Lewis.
Thanks, whoa, who knew! This would be very good if someone would add this info to the compiler API wiki.

Cau? Waneck.

You compile it with HaXe, and then tell FB in profiler setting what to run (create a new profiling profile, specify the file / url to launch), you don't have to compile it in Builder before you start profiling.

Best.

Oleg

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

Bruno Fonzi
In reply to this post by wvxvw
Oleg,

The FDT Profiler is ready to be used in FDT4 Beta:
http://www.fdt.powerflasher.com/developer-tools/fdt-3/fdt-4-beta/milestone-1/

Bruno

On Mar 14, 2010, at 5:06 AM, Oleg Sivokon wrote:

> Hi. Had anyone tried to profile HaXe SWF in Flex (Flash) Builder profiler, or do you have / know of any tools to get all the same basic information on number of instances created / destroyed / persisting in memory?
> BTW, steering offtopic :) I heard that FDT were going to build their own profiler... T_T
>
> Best.
>
> Oleg
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Profiling HaXe SWF

wvxvw
In reply to this post by wvxvw
Hi again. I've got the time to actually try the -D fdb option. And it lets me debug the HaXe SWF - which is also great, I didn't know that was possible either! 
Besides, if I do:

untyped __global__["flash.debugger.enterDebugger"]();

I can even enter step-through debugging mode and so I can step through all my code and inspect local variables and such (However, of course, I cannot see the source code, and the local variables are a little bit messed up - that is the names are strange and it's hard to recognize which was which - particularly, if you're in the loop). Damn, if I only had the time to try and add that to FlashDevlop debugger, that would be awesome :(

Thanks again for the info!

--
haXe - an open source web programming language
http://haxe.org