flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: FlexJS XML string assignment
Date Sun, 07 Aug 2016 20:57:28 GMT

On 8/7/16, 12:09 PM, "Harbs" <harbs.lists@gmail.com> wrote:

>Here’s a couple of examples:
>f.leading = xml.Properties.Leading;
>f.tracking = xml.@Tracking;
>I have 492 some assignments like this scattered across my code. Adding
>toString() to every one of these would add 5412 bytes to the final
>minified code. That’s not including non-XML assignments to string
>variables (assuming there are).
>That’s not huge, but 5.4KB is significant. It also adds an extra function
>call which makes stepping through code a bit more painful.

I'm confused.  Do these lines of code even work without toString() calls?
What do you want the compiler to generate?

Seems like the compiler could try generating:

    f.leading = "" + xml.Properties.Leading;
    f.tracking = "" + xml.@Tracking;

Would that be any better?


View raw message