4 Replies Latest reply on Apr 2, 2010 12:31 AM by jylaxx

    Using RSL ? or not !

    jylaxx

      I have just discovered a strange behaviour of the Flash Player with the Flex framework RSL.

      When you compile you Flex application with RSL linkage, the RSL framework is downloaded only once for all the Flex applications.

      In fact this is true only if the signed version (.swz) of the library is available.

      If you deploy only the unsigned version (.swf) the result is even worse than with the merged into code option.

      I found than with a modular application the framework was downloaded not only each time you are executing the application, but also with EACH module of the application.

      Here is peaces of server log showing each case :

      Case #1 : signed RSL (first load --> RSL is downloaded)

      DEBUG | 01-04-2010 21:34:24:269 | 0013:core.protocol.HTTPMessage.execute(245)| /AXX.swf (272579)

      DEBUG | 01-04-2010 21:34:24:347 | 0014:core.protocol.HTTPMessage.execute(245)| /framework_3.5.0.12683.swz (569996)

      DEBUG | 01-04-2010 21:34:24:769 | 0015:core.protocol.HTTPMessage.execute(245)| /PXSMHome.swf (42364)

      DEBUG | 01-04-2010 21:35:27:879 | 0013:core.protocol.HTTPMessage.execute(245)| /PXUMConfig.swf (84101)

      DEBUG | 01-04-2010 21:35:32:082 | 0013:core.protocol.HTTPMessage.execute(245)| /PXUMIdaxx.swf (76573)

      (next uses --> RSL is NOT downloaded again)

      DEBUG | 01-04-2010 23:10:55:394 | 0013:core.protocol.HTTPMessage.execute(245)| /AXX.swf (272579)

      DEBUG | 01-04-2010 23:10:56:379 | 0013:core.protocol.HTTPMessage.execute(245)| /PXSMHome.swf (42364)

      DEBUG | 01-04-2010 23:11:03:863 | 0014:core.protocol.HTTPMessage.execute(245)| /PXUMConfig.swf (84101)


      Case #2 : unsigned RSL (downloaded with each module !!!)

      DEBUG | 01-04-2010 21:05:19:754 | 0012:core.protocol.HTTPMessage.execute(245)| /AXX.swf (272662)

      DEBUG | 01-04-2010 21:05:20:160 | 0013:core.protocol.HTTPMessage.execute(245)| /framework_3.6.0.13443.swf (568563)

      DEBUG | 01-04-2010 21:05:21:379 | 0014:core.protocol.HTTPMessage.execute(245)| /PXSMHome.swf (42562)

      DEBUG | 01-04-2010 21:05:21:457 | 0013:core.protocol.HTTPMessage.execute(245)| /framework_3.6.0.13443.swf (568563)

      DEBUG | 01-04-2010 21:05:36:004 | 0014:core.protocol.HTTPMessage.execute(245)| /PXUMConfig.swf (84307)

      DEBUG | 01-04-2010 21:05:36:066 | 0015:core.protocol.HTTPMessage.execute(245)| /framework_3.6.0.13443.swf (568563)

      DEBUG | 01-04-2010 21:05:40:519 | 0012:core.protocol.HTTPMessage.execute(245)| /PXUMIdaxx.swf (76811)

      DEBUG | 01-04-2010 21:05:40:613 | 0016:core.protocol.HTTPMessage.execute(245)| /framework_3.6.0.13443.swf (568563)


      Case #3 : RSL is not used, framework is merged in application

      DEBUG | 01-04-2010 23:27:36:800 | 0014:core.protocol.HTTPMessage.execute(245)| /AXX.swf (505900)

      DEBUG | 01-04-2010 23:27:37:254 | 0015:core.protocol.HTTPMessage.execute(245)| /PXSMHome.swf (40836)

      DEBUG | 01-04-2010 23:27:43:019 | 0012:core.protocol.HTTPMessage.execute(245)| /PXUMConfig.swf (145460)

      DEBUG | 01-04-2010 23:27:46:925 | 0012:core.protocol.HTTPMessage.execute(245)| /PXUMIdaxx.swf (152239)

       

      As I am using my own HTTP server, may be there is some header options missing in the HTTP response.

      If anybody can confirm or invalidate these observations, I will be glad to know !

        • 1. Re: Using RSL ? or not !
          Flex harUI Adobe Employee

          Yes, only the signed RSLs are cached and only then will it be to your

          advantage.

           

          When creating modules the recommended practice is, if the main app is using

          signed RSLs, then extern all classes in those RSLs from the module and do

          not setup the module to use RSLs.

          • 2. Re: Using RSL ? or not !
            jylaxx Level 1

            Not sure to understand what you mean about modules !

            Modules are built with the project and optimized for the application.

            I don't find any option to set use of RSL at module level !

            BTW even if RSL is not signed, it seams very strange to download the RSL with each module.

            Main goal of library is to be shared...

            Does your observation should prevent this ?

            • 3. Re: Using RSL ? or not !
              Darrell Loverin Level 4

              Flex Builder 3 passes the same RSL linkage parameters to modules as it does the main application. This bug is fixed in Flash Builder 4. In Flash Builder 4 when the main application is linked with RSLs, each module its statically linked and each SWC that has RSL linkage is put on the external library path. The end result is that a module will not load the same RSLs as the main application but the module gets the size reduction as if is using RSLs.

               

              The only work around I know for Flex Builder 3 bug is to compile your modules at the command line.

               

               

               

              -Darrell

              • 4. Re: Using RSL ? or not !
                jylaxx Level 1

                Thanks for this information !