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

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

问题描述

我们的应用程序在启动时加载速度有点慢,如果在几个swc中分割应用程序的模块会减少加载时间(grosso modo:a module = apage), SWC只是一个压缩的类压缩类压缩文件(静态库)/
编译一个应用程序对SWC没有''''解决方案

有两种方法可以减少初始加载:

1.RSL - 动态库,它们是与应用程序分开加载的,可以被缓存。
由Adobe签名的任何RSL不仅可以通过依赖于平台的缓存的Web浏览器进行缓存,还可以通过Flash Player本身进行缓存,这意味着即使用户清理缓存的浏览器或根本没有缓存,一旦RSL被下载,就被缓存。



这对于flex框架的运行时加载是非常有用的。 RPC。
前面说过的其他类型的RSL缓存是浏览器缓存。
无论哪种方式,RSL都是在启动时加载的。

2.另一种方法是将应用程序的一部分抽取成模块,然后按需求加载。例如,如果应用程序有3个屏幕,则每个屏幕可能会被加载[可能,因为只有当用户第一次进入这个屏幕时,开发人员才能决定何时才能加入)。

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 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 - 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.

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.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天全站免登陆