PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: immerzeel on November 06, 2008, 04:41:06



Title: How much does PureMVC add to SWF filesize
Post by: immerzeel on November 06, 2008, 04:41:06
I want to use the framework to make some templates for banners we often have to produce. Banner development is very limiting in filesize (40-50 Kb Sales, 100-1000 Kb Rich-Media).

How much does the framework add to the SWF filesize?

Cheers,

Pascal


Title: Re: How much does PureMVC add to SWF filesize
Post by: puremvc on November 06, 2008, 04:47:30
About 12k.
-=Cliff>


Title: Re: How much does PureMVC add to SWF filesize
Post by: marek on November 07, 2008, 08:11:29
was 21kb for me however I put some extra functionality. to be honest have a problem to understand how compilator manages internal imports. Curious that larger number of internal imports makes app size much bigger or not really. From my experience I just learn to use:

:
import package.subpackage.classA
import package.subpackage.classB
import package.subpackage.classC

instead of

:
import package.subpackage.*
check your code once you done and compare. For me it saves some kb every time I do clear my code.


Title: Re: How much does PureMVC add to SWF filesize
Post by: immerzeel on November 08, 2008, 08:13:32
I will try to squeeze it in. PureMVC and TweenLite (& TweenGroup) are essential to me, so that is a 16 Kb footprint...

I can live with that.

Thanks guys!


Title: Re: How much does PureMVC add to SWF filesize
Post by: puremvc on November 08, 2008, 09:27:39
I was just going from memory of seeing it on the filesystem the other day.

The actual sizes for the current Standard and MultiCore versions are:

PureMVC_AS3_2_0_4.swc is 11.4kb
PureMVC_AS3_MultiCore_1_0_5.swc is 11.9kb

Also, doing import com.blah.* rather than com.blah.Class1 doesn't increase file size with any set of mxmlc compilation args that I know. However, explicitly naming the classes rather than globbing is still a good practice that should be advocated. It is a helpful guide to a classes collaborators for someone coming upon the class for the first time.

But if the imports aren't kept up to date when people maintain code, then the value of the import list for familiarizing yourself with a class is greatly diminished if not useless.

So, a practice that should become ingrained in the motor-memory of every developer's fingers is the 'Organize Imports' (Ctrl-Shift-O) command in Flex Builder (or whatever analog your favorite IDE has). This command causes all unused imports to be removed and it sorts them. My hands had learned this in Eclipse years ago when I did Java work. Then it was forgotten during what I think of as the 'Dark Time' when Flex Builder was built on Dreamweaver. Now it's back again, so use it folks!

-=Cliff>


Title: Re: How much does PureMVC add to SWF filesize
Post by: marek on November 10, 2008, 03:02:25
Thanks Cliff. Didn't know that. cool feature indeed.
Cheers for info.