构建单独的 .swc 是否允许更快地加载应用程序? [英] Is building separate .swc allow a faster loading of the application?

查看:31
本文介绍了构建单独的 .swc 是否允许更快地加载应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序在启动时加载有点慢,如果在几个 swc 中将应用程序的模块分开会减少加载时间,我就在徘徊(grosso modo : a module = a "page" )

Our application is a bit slow to load at startup, i'm wandering myself if a sepation of the module of the application in several swc will decrease the loading time( grosso modo : a module = a "page" )

推荐答案

SWC 只是一个类似 zip 的类压缩存档(静态库)/针对 SWC 编译应用程序不会更改输出的 swf.有两种方法可以减少初始加载:

SWC is simply a compressed zip-like archive of classes (static library)/ Compiling an application against SWC doesn't change the outputted swf. There are 2 means by which you can decrease the initial loading:

1.RSL - 与应用程序分开加载并可缓存的动态库.Adobe 签名的任何 RSL 不仅可以由依赖于平台的缓存的 Web 浏览器缓存,还可以由 Flash 播放器本身缓存,这意味着即使用户清除其浏览器缓存或根本没有缓存,一旦 RSL已下载,已缓存.

1.RSL - dynamic library which are loaded separately from the application and can be cached. Any RSL signed by Adobe can be cached not just by the web browser which is platform-dependent caching, but also by the flash player itself, which means that even if a user clean its browser cached or has no cache at all, once the RSL is downloaded, it's cached.

这对于 flex 框架的运行时加载通常很有用 &RPC.前面提到的另一种 RSL 缓存是浏览器缓存.无论哪种方式,RSL 都会在启动时加载.

This is typically useful for runtime loading of the flex framework & the RPC. The other type of RSL caching like said earlier is browser caching. Either way, RSL is loaded at startup.

2.另一种方式是将应用程序的一部分提取到模块中,然后按需加载.例如,如果应用程序有 3 个屏幕,每个屏幕可能会被加载 [可能",因为开发人员可以决定何时] 仅当用户第一次进入这个屏幕时

2.The other way is by extracting parts of the application into modules, which will be loaded by demand. For example, if the application has 3 screen, each screen will probably be loaded ["probably", because it's up the developer to decide when] only when the user first enters this screen

这篇关于构建单独的 .swc 是否允许更快地加载应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆