Specifications
CHAPTER 10
198
With RSLs, the RSL needs to be downloaded once only. For two applications that use the same RSL, the result is
an aggregate download size of 350 KB, or a 30% reduction. If you add a third or fourth application, the aggregate
download size increases by 100 KB instead of 250KB for each additional application. In this example, the benefits
of using an RSL increase with each new application.
In this example, the applications with statically-linked libraries run only after Adobe® Flash® Player loads the 250
KB for each application. With dynamically linked RSLs, however, only the first application must load the entire
250 KB (the combined size of the application and the RSL). The second application runs when just 100 KB loads
because the RSL is cached.
The illustrated scenario shows one possible outcome. If your applications do not use all of the components in the
RSL, the size difference (and, as a result, the savings in download time) might not be as great. Suppose that each
application only uses half of the components in the RSL. If you statically link the library, only those classes that
are used are included; the output, as a result, is 100 KB + 75 KB for the first application and the library and 100
KB + 75 KB for the second application and the library, or an aggregate download size of 350 KB. When you use a
library as an RSL, its entire SWF file must be transferred across the network and loaded by the application at run
time, regardless of how much of that library is actually used. In this second case, the combined download size
when using RSLs and when not using RSLs is the same.
In general, the more Flex applications that use a common RSL, the greater the benefit.
Without RSLs
(Using statically-linked
component libraries)
With RSLs
Flash Player
500 KB
350 KB
250 KB
App1 + lib
250 KB
App2 + lib
RSL
150 KB
App1
100 KB
App2
100 KB










