[flexcoders] Why is my swf so big?

2008-07-22 Thread whatabrain
Probably an old question, but I didn't find anything useful by 
searching the group.

I'm using the trial version of Flex Builder 3 Standard. I create a new 
Flex project, and, without writing any code, export a release build. 
The swf file size is 147KB. Then I create a project that contains 
nothing but an empty DataGrid. The file size grows to 242KB! Throw in 
an AdvancedDataGrid, and it's up to 300KB.

Is there anything I can do to reduce the size? Even 147KB seems huge 
for an empty app. And why does DataGrid pump it up so much? I heard 
that the Flex framework was included in the Flash 9 runtime. If that's 
true, adding a DataGrid should have no effect on output size.



RE: [flexcoders] Why is my swf so big?

2008-07-22 Thread Alex Harui
If you turn on the shared RSL, it will shrink the swf significantly.

 

Frameworks tend to be heavy, especially if the focus is on RAD.  Just
look at any MFC app.  DG brings in the collections subsystem, ADG brings
in hierarchical collections.

 

The framework is not included in the Flash 9 runtime.  It has to be
downloaded by some app into that user's browser, then other apps can use
it.

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of whatabrain
Sent: Tuesday, July 22, 2008 2:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Why is my swf so big?

 

Probably an old question, but I didn't find anything useful by 
searching the group.

I'm using the trial version of Flex Builder 3 Standard. I create a new 
Flex project, and, without writing any code, export a release build. 
The swf file size is 147KB. Then I create a project that contains 
nothing but an empty DataGrid. The file size grows to 242KB! Throw in 
an AdvancedDataGrid, and it's up to 300KB.

Is there anything I can do to reduce the size? Even 147KB seems huge 
for an empty app. And why does DataGrid pump it up so much? I heard 
that the Flex framework was included in the Flash 9 runtime. If that's 
true, adding a DataGrid should have no effect on output size.

 



Re: [flexcoders] Why is my swf so big?

2008-07-22 Thread Doug McCune
ADG also brings in the largest classes in the Flex framework. I just did a
link report on one of my projects and here are some of the results for the
ADG-related classes (I stopped at classes under 1k cause who really cares).
This is the output of a link report on a non-optimized swf (so the #s are
probably not accurate to what you would see in a production swf).

AdvancedDataGrid - 103.1 k
AdvancedListBase - 93.2 k
AdvancedDataGridBaseEx - 87.6 k
AdvancedDataGridBase - 28.2 k
AdvancedDataGridColumn - 12.8 k
AdvancedDataGridHeaderRenderer - 10.5 k
AdvancedDataGridSortItemRenderer - 6.4 k
AdvancedDataGridDragProxy - 3.6 k
AdvancedListBaseContentHolder - 2.7 k
AdvancedDataGridColumnGroup - 2.5 k
AdvancedDataGridEvent - 2.4 k
AdvancedDataGridHeaderHorizontalSeparator - 1.5 k
AdvancedDataGridHeaderInfo - 1.3 k
AdvancedDataGridBaseSelectionPending - 1.3 k
AdvancedDataGridListData - 1.2 k
AdvancedDataGridBaseSelectionData - 1 k
IAdvancedDataGridRendererProvider - 1 k

Then there are the hierarchical collection classes:

HierarchicalCollectionView - 17.7 k
HierarchicalCollectionViewCursor - 12 k
HierarchicalData - 2.7 k
IHierarchicalCollectionView - 2.7 k
IHierarchicalData - 1,1 k

So yeah, AdvancedDataGrid is 8,433 lines of code. If you add up the top 4
classes in the list above (AdvancedDataGrid, AdvancedListBase,
AdvancedDataGridEx, and AdvancedDataGridBase) you get a whopping total of
26,521 lines of code. It makes me cry.

So be aware.

Doug

On Tue, Jul 22, 2008 at 3:54 PM, Alex Harui [EMAIL PROTECTED] wrote:

If you turn on the shared RSL, it will shrink the swf significantly.



 Frameworks tend to be heavy, especially if the focus is on RAD.  Just look
 at any MFC app.  DG brings in the collections subsystem, ADG brings in
 hierarchical collections.



 The framework is not included in the Flash 9 runtime.  It has to be
 downloaded by some app into that user's browser, then other apps can use it.

 -Alex


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *whatabrain
 *Sent:* Tuesday, July 22, 2008 2:09 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Why is my swf so big?



 Probably an old question, but I didn't find anything useful by
 searching the group.

 I'm using the trial version of Flex Builder 3 Standard. I create a new
 Flex project, and, without writing any code, export a release build.
 The swf file size is 147KB. Then I create a project that contains
 nothing but an empty DataGrid. The file size grows to 242KB! Throw in
 an AdvancedDataGrid, and it's up to 300KB.

 Is there anything I can do to reduce the size? Even 147KB seems huge
 for an empty app. And why does DataGrid pump it up so much? I heard
 that the Flex framework was included in the Flash 9 runtime. If that's
 true, adding a DataGrid should have no effect on output size.