flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Compiling MXMLs Through Windows Command Line
Date Fri, 01 Feb 2013 20:08:14 GMT
For Adobe Flex, the signed RSLs were loaded into a special cache.  If you
got lucky, your user used some other Flex application that used the same
version of the RSLs as you did.  In that case, the user download your 122K
app and the app started.

But if your customer had not run a Flex app using the same versions of the
RSLs, they had to wait for about 1MB of RSLs to download before they could
download your 122K app and see it run.

With Apache Flex, RSLs are not signed so they don't go in a special cache.
You can still use the unsigned RSLs and serve them with your app, but then
every user downloads the 1MB of RSLs and the 122K app the first time, and
also on subsequent runs unless those SWFs are still in the browser cache.

So, it is probably better to serve your 774KB app than require 1.122MB each
time the app runs.

But, I'll bet you can break your 774KB app into smaller chunks using
modules.  The first hit might then be in the 300Kb to 400Kb range just to
get a first screen up, then while the user is reading the first screen or
logging in, you load other modules.

But first, make sure you are looking at SWF sizes based on "Export for
Release" instead of just in the bin-debug folder.  Debug SWFs are
significantly larger than release mode SWFs.

And FWIW, I'm working on a new framework with a more granular implementation
that should result in much smaller applications because I think download
size is important.  Flex's main target in the past was apps hosted on
corporate intranets where download time was less of an issue.


On 2/1/13 11:54 AM, "Angelo Anolin" <angelo.anolin@gmail.com> wrote:

> Hi Alex,
> 
> Thanks for the reply.
> 
> I am just a little concerned, since the SWF will be loaded when the
> application is started, wouldn't having a big swf file do a big hit already
> on the network resources?
> 
> So is it fair to say, that since the RSL linkage would be a one time hit,
> then the succeeding load of the SWF application will be smaller? Or will it
> still be the same size as it is compiled?
> 
> Appreciate the insights on this.
> 
> Thanks.
> 
> Angelo
> 
> 
> 
> On Fri, Feb 1, 2013 at 11:23 AM, Alex Harui <aharui@adobe.com> wrote:
> 
>> Is that release build or debug build?
>> 
>> Flex apps certainly can be a MB or more.  I think a release mode Hello
>> World
>> is over 100K. RSLs helped, but if the user didn't have the RSLs already,
>> the
>> user ended up downloading all of the RSLs as well, which is a much bigger
>> first-time hit.
>> 
>> Adobe signed Adobe Flex RSLs to allow for a special RSL cache so RSLs could
>> be used across domain security boundaries.  Adobe does not sign RSLs from
>> third-parties, including Apache, so there is no way to leverage the
>> cross-domain RSL cache anymore.  That is a bummer, but also note that if
>> Apache Flex starts releasing every couple of months or so, the probability
>> of a cache-miss goes way up, so more of your users would suffer the bigger
>> first-time hit.  That's why in the new framework, I'm trying to make the
>> code more granular so small apps are really small and RSLs will not be
>> important to those apps.
>> 
>> Without using RSLs, the next step to optimize is to use modules and put
>> everything not needed in the first screen into a module.
>> 
>> 
>> 
>> On 2/1/13 9:59 AM, "Angelo Anolin" <angelo.anolin@gmail.com> wrote:
>> 
>>> OK, I tried to set this option to TRUE:
>>> 
>>> -static-link-runtime-shared-libraries
>>> 
>>> and I was able to compile the mxml and the swf loads properly, although
>> my
>>> concern is that the generated SWF file is quite huge (774KB) as compared
>> to
>>> the 122KB I originally had when I set the option above to FALSE.
>>> 
>>> So, how can I optimize the generation of the SWF so that it would
>> smaller?
>>> 
>>> Thanks.
>>> 
>>> On Fri, Feb 1, 2013 at 10:54 AM, Angelo Anolin <angelo.anolin@gmail.com
>>> wrote:
>>> 
>>>> Getting a little confused here.
>>>> 
>>>> When I run the command line compiler, it says:
>>>> 
>>>> Required RSLs:
>>>> framework_4.9.0.1425567.swf
>>>> textLayout_4.9.0.1425567.swf
>>>> spark_4.9.0.1425567.swf
>>>> sparkskins_4.9.0.1425567.swf
>>>> rpc_4.9.0.1425567.swf
>>>> mx_4.9.0.1425567.swf
>>>> 
>>>> and the last line would be:
>>>> 
>>>> c:\FlexSDK\bin\MyMXML.swf (108020 bytes)
>>>> 
>>>> c:\FlexSDK\bin>
>>>> 
>>>> So, how do I not use the RSLs from the command line?
>>>> 
>>>> Thanks
>>>> 
>>>> Angelo
>>>> 
>>>> 
>>>> 
>>>> On Fri, Feb 1, 2013 at 10:07 AM, Alex Harui <aharui@adobe.com> wrote:
>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> On 2/1/13 8:16 AM, "Angelo Anolin" <angelo.anolin@gmail.com> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I've just tested compiling my old MXMLs using the installer and it
did
>>>>>> compiled into an SWF properly.
>>>>>> 
>>>>>> The error I have right now is that when I run the SWF embedded, the
>> SWF
>>>>> is
>>>>>> stating:
>>>>>> 
>>>>>> Error #2032
>>>>>> 
>>>>>> right at the bottom part.
>>>>>> 
>>>>>> Any idea or reference on this?
>>>>>> 
>>>>> I would guess that the RSL configuration is incorrect.  Note that
>> Apache
>>>>> Flex does not have signed RSLs (.swz files) and RSLs are not centrally
>>>>> hosted.  I would recommend not using RSL configurations unless you are
>>>>> serving multiple SWFs from a single domain.
>>>>> 
>>>>> --
>>>>> Alex Harui
>>>>> Flex SDK Team
>>>>> Adobe Systems, Inc.
>>>>> http://blogs.adobe.com/aharui
>>>>> 
>>>>> 
>>>> 
>> 
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>> 
>> 

-- 
Alex Harui
Flex SDK Team
Adobe Systems, Inc.
http://blogs.adobe.com/aharui


Mime
View raw message