RSLs on by default in Flex 4

As of last week’s Flex 4 builds, using the framework RSL has now been turned on by default. If you compile with one of these builds, you will probably notice a difference in your start up time. If you are compiling a small Flex 4 application, the start up may be slower than it used to be. This is because the RSL takes some time to get parsed int he beginning. But, in the end, when you are building real life applications which are much larger, using the framework RSL should be extremely beneficial.

One problem that I did run into was when having RSLs on by default was when I had an application using runtime CSS. I documented this in bug SDK-22172. Not thinking, I compiled my css file with the defaults. Apparently, this is not recommended. My bug was marked “Not a Bug” and I was given this advice:

“CSS modules are loaded into the same application domain as the application that loads them. Assuming the application has loaded all the needed RSLs, then CSS modules do not need to load RSLs. In this scenario the CSS modules should be statically linked and also externalize the swcs linked as RSLs in the main application. Swcs are externalized by adding them to the compiler’s “-external-library-path” option. The amount of benefit depends on how many classes are referenced in the css file.”

By the way, if you want to compile an application without using rsls, you would add the compiler argument: -static-link-runtime-shared-libraries=true

2 responses

  1. yes I have noticed the slower start up time. Quite inconvenient

  2. […] doing a quick search, I found this post on  RSLs on by default in Flex 4.  Basically framework RSL’s are by default loaded by the swf file that is created when using […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: