[osflash] Know how many kb each class adds to the SWF when compiling with MTASC
Bob Ippolito
bob at redivi.com
Thu Aug 3 19:16:24 EDT 2006
How does class size really help there? A library is a more or less a
fixed size, you could find out how big it is just by throwing
together a trivial SWF that uses it. The size of a class isn't very
useful anyway unless it has no dependencies, what you need to know is
the size of the entire dependency graph that class brings in (if
you're trying to decide whether to use it or not).
It sounds like what you actually want is a tool that generates a
dependency graph so you can find out which classes aren't used at all
in any obvious way. Eliminating all of those could be a significant
savings at very little cost... Unless of course dynamism/reflection
happens to be used to find classes, in which case you'd have to
manually add stuff to the dependency graph.
You could go even farther and eliminate dead code by removing unused
methods and their dependencies, but that requires a lot more analysis
and source code transformation. I guess you could get away with
eyeballing it and manually excluding certain edges from the
dependency graph, but that would still require source code
transformations in order to get it to compile.
-bob
On Aug 3, 2006, at 3:25 PM, Ralf Bokelberg wrote:
> Maybe optimzing?
> Eg. do i really need this big lib, which adds 400k to my app, or am i
> better of to write the functions is need on my own? Maybe i'm a
> controlfreak though :)
>
> Cheers,
> Ralf.
>
>
> On 8/4/06, Bob Ippolito <bob at redivi.com> wrote:
>> Not necessarily.
>>
>> I don't really understand why this feature is useful. You might as
>> well measure the file size of the .as or the number of lines or
>> something like that. If you need code for the app to work, it doesn't
>> really matter how big it is does it?
>>
>> -bob
>>
>> On Aug 3, 2006, at 2:40 PM, Scott Hyndman wrote:
>>
>>> Would the percentage size of a single class file with respect to the
>>> entire uncompressed build be proportionate to that of its compressed
>>> counterpart?
>>>
>>> For example,
>>>
>>> Uncompressed:
>>> class A - 2k
>>> entire build - 10k
>>>
>>> Compressed:
>>> class A - 1k
>>> entire build - 5k
>>>
>>> See what I'm getting at? I don't really know anything about
>>> compression, so forgive me if this sounds ignorant.
>>>
>>> Scott
>>>
>>> On 03/08/06, Ken Rogers <krogers at iwin.com> wrote:
>>>> That would be fantastic. Thanks for asking this question, as I was
>>>> wondering the same. I would immediately gain a lot from this small
>>>> feature. :D
>>>> -Ken
>>>>
>>>> Ralf Bokelberg wrote:
>>>>> Good question.
>>>>> I could add an option to display the size of each compiled class,
>>>>> eg.
>>>>> soemthing like sizeReport in Flash,
>>>>>
>>>>> Cheers,
>>>>> Ralf.
>>>>>
>>>>> On 8/3/06, João Saleiro <joao.saleiro at webfuel.pt> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> Hi people,
>>>>>>
>>>>>>
>>>>>>
>>>>>> Is there a way to compile on MTASC and know exactly how many kb
>>>>>> each class
>>>>>> adds to the swf?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>>
>>>>>>
>>>>>> João
>>>>>> _______________________________________________
>>>>>> 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
>>
>
>
> --
> Ralf Bokelberg <ralf.bokelberg at gmail.com>
> Flex & Flash Consultant based in Cologne/Germany
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
More information about the osflash
mailing list