[osflash] mtasc slower than IDE ???

Arnoud Bos a.bos9 at chello.nl
Wed Jul 19 09:50:31 EDT 2006


I don't know :-) 

 

In my app i use screens. These are actually extended movieclips (I like to
move them around etc.)

But I don't want to make a library item of the Screen. All assets that go
into the screen

are made programmically (that's not an English word for sure :-))

 

NB the create function is a method of my screen class.

 

So I create an movieclip (by using a static factory method) and then I
reassign the 

Prototype from movieclip to Screen as well as the constructor.

Finally I cast it to Screen. 

 

And then I have a screen object with a visual representation on screen
without the

Need for a library representation of the Screen in the Flash IDE. 

 

To be short, I like to keep as much of my apps in the code so that I don't
have to switch between Flash ide and

FlashDevelop when developing.

 

Btw th GDispatcher is needed to broadcast screen events to my GUI manager
that moves the screens around etc.

 

 

Hope that helps,

 

arnoud

 

  

 

  _____  

Van: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org] Namens
Ben Smeets
Verzonden: woensdag 19 juli 2006 10:10
Aan: Open Source Flash Mailing List
Onderwerp: Re: [osflash] mtasc slower than IDE ???

 

Looks interesting... but what does it do exactly?

 

Grt, Ben

 

  _____  

From: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org] On
Behalf Of Arnoud Bos
Sent: dinsdag 18 juli 2006 14:34
To: 'Open Source Flash Mailing List'
Subject: Re: [osflash] mtasc slower than IDE ???

Hi Martin,

 

Strange, cause i use delegates al the time as well as event dispatching.

Also the project has 30+ classes with some 1000 rules of code in them.

What I do use is the prototype hack like:

(this is the create function in my Screen class)

 

 

public static function create(target:MovieClip, name:String, depth:Number,
visible:Boolean) : Screen {

                        

                        // create the visual representation of the screen.

                        // uses a hack to prevent needles library assets
with linkage is's or classes attached 

                        var goal:MovieClip =
target.createEmptyMovieClip(name, depth);

                        goal._visible = visible;

                        goal.__proto__ = Screen.prototype;      // redirect
objects prototype chain

                        goal.__constructor__ = Screen;            // assign
superclass constructor to the object

                        var instance:Screen = Screen(goal);      // force
right class

                        GDispatcher.initialize(instance);             //
make dispatcher

                        return instance;
// return the instance

            }

 

This I use in many classes that have a visual representation.

 

Maybe there is something in this code MTASC doesn't like too much.

It does work however :-)

 

 

Thanx,

 

Arnoud

 

 

 

  _____  

Van: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org] Namens
Martin Heidegger
Verzonden: dinsdag 18 juli 2006 12:32
Aan: Open Source Flash Mailing List
Onderwerp: Re: [osflash] mtasc slower than IDE ???

 

Well I recognized the MM Compiler (7&8) to be slower if you use complex
relationships. The more you type the slower it gets. Delegations and complex
structures help to confuse it further. Perhaps for the cases where it uses
almost no typing (just preparing bytecode from methods) it might be almost
same fast. Just thoughts... 

yours
Martin.

2006/7/18, Arnoud Bos <a.bos9 at chello.nl>:


Thnx David and Nicholas for your answers,

It was indeed the ASO cache, when deleting it theye are  now both compiling
at apox the same speed.

I think the speed improvement of MTASC is most noticeable when you have a 
complex library that needs not to be recompiled due to the code injection,
right?

My lib is not complex at all so that may be the reason that the performance
is likewise of both.

Thanx again.

Arnoud


-----Oorspronkelijk bericht-----
Van: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org] Namens

David Rorex
Verzonden: dinsdag 18 juli 2006 6:08
Aan: Open Source Flash Mailing List
Onderwerp: Re: [osflash] mtasc slower than IDE ???

So does flash 8, the whole '.ASO' issues come from that if i'm correct. 

Try doing Delete All ASO files (or Clear All ASO files) in the IDE
before compiling & timing it. It's in one of the top-level menus

-David R

On 7/17/06, Arnoud Bos < a.bos9 at chello.nl <mailto:a.bos9 at chello.nl> > wrote:
>
> Im not using flex builder :)
> This is a flash 8 project
>
> Thanks,
>
> Arnoud
>
> -----Oorspronkelijk bericht-----
> Van: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org]
Namens
> Richard Lyman
> Verzonden: dinsdag 18 juli 2006 0:55
> Aan: Open Source Flash Mailing List 
> Onderwerp: Re: [osflash] mtasc slower than IDE ???
>
> Flex Builder uses incremental compilation by default.
>
> _______________________________________________
> osflash mailing list 
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>

_______________________________________________
osflash mailing list
osflash at osflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org


_______________________________________________
osflash mailing list
osflash at osflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org




-- 
ICQ: 117662935
Skype: mastakaneda 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20060719/7b2c75dc/attachment-0001.htm


More information about the osflash mailing list