Re: [Flashcoders] How much bytes ActionScript classes take in SWF?

2009-04-18 Thread Juan Pablo Califano
I'm afraid the flex SDK is for AS 3 only.

As you know, the flash IDE compiler won't give you that report. MTASC won't
do it either, I think (at least, it has no switch for that).

Can you run .NET 1.1?

If so, I might have a way to get that data. Some time ago I wrote a very
basic swf parser. It's very basic but could work. It reads the swf, and
identifies all the tags. AS 2 classes are compiled with 2 tags, if I'm not
wrong. An export tag, which defines the name of the class or interface (plus
some internal ID), and a DoInitAction, which contains the compiled bytecode
for that class. I'm already getting the size of the tags, so tweaking the
code to report the name and the size of each class shouldn't be too hard; I
think I wouldn't take more than 1 hour, since all the data is already
there; it just needs to be printed.

This is an OS project, hosted on google code (
http://code.google.com/p/swfparserlib/). It'm not developing it currently,
but I could add that report easily if you are interested. And, of course,
since it's open source, you could tweak it yourself if you feel like.

Cheers
Juan Pablo Califano


2009/4/18 Pavel Repkin 

> Thanks, Juan, this is exactly what I'm looking for!
> Does flex compiler work with ActionScript 2.0?
> I forgot to mention that we are working with 2.0.
>
> On Wed, Apr 15, 2009 at 5:40 PM, Juan Pablo Califano <
> califa010.flashcod...@gmail.com> wrote:
>
> > PS: a couple of notes since my last message could be misleading:
> >
> > 1) By easy to compile I didn't mean that the result of using the SDK
> > compiler will produce the same swf. I just mean it could be a good way to
> > check what classes are included.
> >
> > 2) Any code in the fla will not be included, of course. If you create a
> ref
> > to some class only in timeline code, it will not be included in the swf
> > compiled with the sdk
> >
> >
> >
> > 2009/4/15, Juan Pablo Califano :
> > >
> > > If you have a document class in place, it should be easy to compile
> your
> > > project with the flex SDK compiler. You could compile on the command
> > line,
> > > which is not too hard or try some IDE like Flashdevelop (if you're on
> > > windows), where setting up a project is pretty stright forward.
> > >
> > > The extra compiler argument you need is -link-report
> > > "size-report.xml". This will generate an xml detailed information about
> > all
> > > compiled classes, theirs dependencies, and the optimized and
> unoptimized
> > > size. You could then parse this xml and create your own "report" as you
> > > like.
> > >
> > > Cheers
> > > Juan Pablo Califano
> > >
> > >
> > > 2009/4/15, Pavel Repkin :
> > >>
> > >> There are 500 KB of ActionScript code in our project (according to
> Flash
> > >> size-report)
> > >> That is a lot.
> > >> I want to find the classes (packages) that take most space.
> > >> And then to optimize them.
> > >> And throw away classes that were linked by a mistake.
> > >>
> > >> So I want to find out how much space take individual classes and
> > packages
> > >> in
> > >> the swf.
> > >>
> > >> Do you know a tool that can help me?
> > >> Ideally the app should display class tree with size in KB beside each
> > >> node.
> > >>
> > >> Pasha.
> > >> ___
> > >> Flashcoders mailing list
> > >> Flashcoders@chattyfig.figleaf.com
> > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>
> > >
> > >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How much bytes ActionScript classes take in SWF?

2009-04-17 Thread Pavel Repkin
Thanks, Juan, this is exactly what I'm looking for!
Does flex compiler work with ActionScript 2.0?
I forgot to mention that we are working with 2.0.

On Wed, Apr 15, 2009 at 5:40 PM, Juan Pablo Califano <
califa010.flashcod...@gmail.com> wrote:

> PS: a couple of notes since my last message could be misleading:
>
> 1) By easy to compile I didn't mean that the result of using the SDK
> compiler will produce the same swf. I just mean it could be a good way to
> check what classes are included.
>
> 2) Any code in the fla will not be included, of course. If you create a ref
> to some class only in timeline code, it will not be included in the swf
> compiled with the sdk
>
>
>
> 2009/4/15, Juan Pablo Califano :
> >
> > If you have a document class in place, it should be easy to compile your
> > project with the flex SDK compiler. You could compile on the command
> line,
> > which is not too hard or try some IDE like Flashdevelop (if you're on
> > windows), where setting up a project is pretty stright forward.
> >
> > The extra compiler argument you need is -link-report
> > "size-report.xml". This will generate an xml detailed information about
> all
> > compiled classes, theirs dependencies, and the optimized and unoptimized
> > size. You could then parse this xml and create your own "report" as you
> > like.
> >
> > Cheers
> > Juan Pablo Califano
> >
> >
> > 2009/4/15, Pavel Repkin :
> >>
> >> There are 500 KB of ActionScript code in our project (according to Flash
> >> size-report)
> >> That is a lot.
> >> I want to find the classes (packages) that take most space.
> >> And then to optimize them.
> >> And throw away classes that were linked by a mistake.
> >>
> >> So I want to find out how much space take individual classes and
> packages
> >> in
> >> the swf.
> >>
> >> Do you know a tool that can help me?
> >> Ideally the app should display class tree with size in KB beside each
> >> node.
> >>
> >> Pasha.
> >> ___
> >> Flashcoders mailing list
> >> Flashcoders@chattyfig.figleaf.com
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How much bytes ActionScript classes take in SWF?

2009-04-17 Thread Pavel Repkin
Yes, but does not display how much does packages or individual classes take.
Just tells how much ActionScript code takes.

On Wed, Apr 15, 2009 at 2:55 PM, Glen Pike wrote:

> Sorry, misread your email and jumped the gun - the size report should tell
> you how big your classes are though...
>
>
> Pavel Repkin wrote:
>
>> There are 500 KB of ActionScript code in our project (according to Flash
>> size-report)
>> That is a lot.
>> I want to find the classes (packages) that take most space.
>> And then to optimize them.
>> And throw away classes that were linked by a mistake.
>>
>> So I want to find out how much space take individual classes and packages
>> in
>> the swf.
>>
>> Do you know a tool that can help me?
>> Ideally the app should display class tree with size in KB beside each
>> node.
>>
>> Pasha.
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>
>>
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How much bytes ActionScript classes take in SWF?

2009-04-15 Thread Juan Pablo Califano
PS: a couple of notes since my last message could be misleading:

1) By easy to compile I didn't mean that the result of using the SDK
compiler will produce the same swf. I just mean it could be a good way to
check what classes are included.

2) Any code in the fla will not be included, of course. If you create a ref
to some class only in timeline code, it will not be included in the swf
compiled with the sdk



2009/4/15, Juan Pablo Califano :
>
> If you have a document class in place, it should be easy to compile your
> project with the flex SDK compiler. You could compile on the command line,
> which is not too hard or try some IDE like Flashdevelop (if you're on
> windows), where setting up a project is pretty stright forward.
>
> The extra compiler argument you need is -link-report
> "size-report.xml". This will generate an xml detailed information about all
> compiled classes, theirs dependencies, and the optimized and unoptimized
> size. You could then parse this xml and create your own "report" as you
> like.
>
> Cheers
> Juan Pablo Califano
>
>
> 2009/4/15, Pavel Repkin :
>>
>> There are 500 KB of ActionScript code in our project (according to Flash
>> size-report)
>> That is a lot.
>> I want to find the classes (packages) that take most space.
>> And then to optimize them.
>> And throw away classes that were linked by a mistake.
>>
>> So I want to find out how much space take individual classes and packages
>> in
>> the swf.
>>
>> Do you know a tool that can help me?
>> Ideally the app should display class tree with size in KB beside each
>> node.
>>
>> Pasha.
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How much bytes ActionScript classes take in SWF?

2009-04-15 Thread Juan Pablo Califano
If you have a document class in place, it should be easy to compile your
project with the flex SDK compiler. You could compile on the command line,
which is not too hard or try some IDE like Flashdevelop (if you're on
windows), where setting up a project is pretty stright forward.

The extra compiler argument you need is -link-report "size-report.xml". This
will generate an xml detailed information about all compiled classes, theirs
dependencies, and the optimized and unoptimized size. You could then parse
this xml and create your own "report" as you like.

Cheers
Juan Pablo Califano


2009/4/15, Pavel Repkin :
>
> There are 500 KB of ActionScript code in our project (according to Flash
> size-report)
> That is a lot.
> I want to find the classes (packages) that take most space.
> And then to optimize them.
> And throw away classes that were linked by a mistake.
>
> So I want to find out how much space take individual classes and packages
> in
> the swf.
>
> Do you know a tool that can help me?
> Ideally the app should display class tree with size in KB beside each node.
>
> Pasha.
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How much bytes ActionScript classes take in SWF?

2009-04-15 Thread Glen Pike
Sorry, misread your email and jumped the gun - the size report should 
tell you how big your classes are though...



Pavel Repkin wrote:

There are 500 KB of ActionScript code in our project (according to Flash
size-report)
That is a lot.
I want to find the classes (packages) that take most space.
And then to optimize them.
And throw away classes that were linked by a mistake.

So I want to find out how much space take individual classes and packages in
the swf.

Do you know a tool that can help me?
Ideally the app should display class tree with size in KB beside each node.

Pasha.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How much bytes ActionScript classes take in SWF?

2009-04-15 Thread Glen Pike

Hi,

   In your Publish Settings there is a "generate size report" option or 
something similar.  Tick the box and publish and it will create a text 
file detailing the contents and sizes of stuff in your SWF.


   Glen

Pavel Repkin wrote:

There are 500 KB of ActionScript code in our project (according to Flash
size-report)
That is a lot.
I want to find the classes (packages) that take most space.
And then to optimize them.
And throw away classes that were linked by a mistake.

So I want to find out how much space take individual classes and packages in
the swf.

Do you know a tool that can help me?
Ideally the app should display class tree with size in KB beside each node.

Pasha.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders