[mtasc] Different way of saving classes
robert.edgar at epresenterplus.com
Tue Sep 13 04:36:22 CEST 2005
>>X = new d();
I might be wrong but I think you will find that when it is compiled that
gets changed to X = new a.b.c.d();, the short form is only syntax sugar, at
least I think it is that way under MMC.
Then in order to execute that requires a number of statements as it must
navigate to d like;
Or something like that
In which case new a_b_c_d() would in theory not only be faster but also lead
to a smaller fotprint.
I always assumed that was why MM choose "mx" instead of "com.macromedia.mx"
to keep the chain small.
Also I would disagree about new() not being called in performance itensive
loops, if you build forms from code which I assume msot people are doing
with MTASC one of the most performance intensive "loops" would be
instantiating controls on a form which would be creating a lot of new
That said I havent seen examples of Flex working as has been outline in this
thread, but I have only looked at a couple of files so I don't know much
Also there are a number of important situations where this change would
break the Flash player like.... TextField.StyleSheet and there are many more
examples like this, I think a lot of the new Flash8 features are handled in
this way as well "flash.filters.ColorMatrixFilter", so I am not sure how
this could be implemented anyway.
From: mtasc-bounces at lists.motion-twin.com
[mailto:mtasc-bounces at lists.motion-twin.com] On Behalf Of Keith Peters
Sent: Monday, September 12, 2005 1:23 PM
To: drorex at gmail.com; 'MotionTwin ActionScript2 Compiler List'
Subject: RE: [mtasc] Different way of saving classes
> -----Original Message-----
> From: mtasc-bounces at lists.motion-twin.com
> [mailto:mtasc-bounces at lists.motion-twin.com] On Behalf Of David Rorex
> Sent: Monday, September 12, 2005 8:51 PM
> To: MotionTwin ActionScript2 Compiler List
> Subject: Re: [mtasc] Different way of saving classes
> Also the statement 'new a.b.c.d()' would be replaced with
> 'new a_b_c_d()'
> But I would think in most applications, 'new ...' is not
> called in performance critical loops or anything.
Further, if you are using "new" in a performance critical loop, you'd
normally just import the class and use new on the class itself.
X = new d();
MTASC : no more coffee break while compiling
More information about the mtasc