incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <>
Subject Re: RFC - additional registerClassAlias
Date Thu, 05 Apr 2012 21:29:55 GMT

On 4/5/12 2:14 PM, "Michael A. Labriola" <>

> So, how does that work when someone sends a Vector over a RemoteObject call?
> Do they now need to extend RemoteObject to ensure it serializes properly?
RemoteObject could have an additional resultFormat that tells you to run
those aliases.

> Vector is a built in type. Why should it work differently?
Why should built-ins be auto-registered, but my custom classes are not
(without doing [RemoteClass])?

> That doesn't seem
> to track with what a user would expect of the framework to me. So, personally,
> if I can serialize a String today into a ByteArray without registration and I
> can serialize an Array without doing registration, then it seems to me I
> should be able to serialize a Vector of Strings without doing registration of
> my own.
> Incidentally, this is what we are talking about:
> registerClassAlias( "Boolean", Boolean );
> registerClassAlias( "int", int );
> registerClassAlias( "Number", Number );
> registerClassAlias( "String", String );
> registerClassAlias( "uint", uint );
> registerClassAlias( "Array", Array );
> registerClassAlias( "Date", Date );
> registerClassAlias( "Vector", Vector );
> I ran it in a loop (in debug mode) on my machine 10,000 times which took a
> total of 31ms. I am not for inflating startup times either, but I am thinking
> the ~0.0031ms minus the loop time (which I am guessing is the balance) might
> not be noticed in the average app.
There are other problems with the Vector implementation besides this one.
This is one of the places I do wish we could get a VM change, but we can't
and will have to live some with imperfections.

I believe you are a proponent of "pay-as-you-go" in Flex and having the
compiler always generate this code is not PAYG.  If you want to add a
compiler option, that might be ok too.  I just believe that, if you write
low-level AS3 code, it should be exactly what you wrote and not have other
stuff added in.  Also, having spent the last several years trying to
optimize Flex, one of the problems is that there are 1000's of little
helpful code snippets like this in Flex and each take less than 1ms. But
after you add them up, you've add 500ms to the startup time of your app.

So, I'm asking you to think about a PAYG way of doing this before making
every app pay.

Alex Harui
Flex SDK Team
Adobe Systems, Inc.

View raw message