热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

最小化Flex应用程序大小的一般技巧和技巧-GeneraltipsandtechniquesforminimizingthesizeofFlexapplications

IreallyliketheFlexframework,howeverIroutinelydealwithSWFfilesthatare~500KB.我非常喜欢Fl

I really like the Flex framework, however I routinely deal with SWF files that are ~ 500KB.

我非常喜欢Flex框架,但是我经常处理大约500KB的SWF文件。

I don't know at what point a file considered to be "too big" to be served on the internet, but I would assume that a 500KB download just to use a web application would certainly annoy some users.

我不知道在什么时候文件被认为“太大”无法在互联网上提供,但我认为仅仅使用网络应用程序进行500KB下载肯定会使一些用户烦恼。

Are there any tips or techniques on reducing the size of compiled SWFS?

是否有任何关于减少已编译SWFS大小的技巧或方法?

As a side note, the 500KB SWF file really isn't that big of application...

作为旁注,500KB SWF文件真的不是那么大的应用程序......

4 个解决方案

#1


3  

This might help you: http://www.onflex.org/ted/2008/01/flex-3-framework-caching.php

这可能对您有所帮助:http://www.onflex.org/ted/2008/01/flex-3-framework-caching.php

Chances are the user has already encountered the packaged framework before, so it would be cached. At the very least they won't have to load it from your site again.

用户之前已经遇到过打包过的框架,因此它会被缓存。至少他们不必再次从您的网站加载它。

#2


1  

This answer is a little more general than you're probably looking for (it applies to all web apps, whether Flash/Flex-based or HTML/CSS/JS based or whatever), but...

这个答案比您可能正在寻找的更为通用(它适用于所有Web应用程序,无论是基于Flash / Flex还是基于HTML / CSS / JS或其他),但......

It depends a lot on the use case for your application. Is it an application that will be loaded all day and pull in updates as necessary (like Gmail) or is it something that will be launched, used, then closed?

这在很大程度上取决于您的应用程序的用例。它是一个应用程序,将整天加载并根据需要提取更新(如Gmail)或是它将被启动,使用,然后关闭?

If the former, besides reducing resource size, you are probably alright here. It makes more sense to get the downloading all out of the way at once, rather than to expect the user to tolerate delays at every turn.

如果是前者,除了减少资源规模外,你可能还好。将下载全部放在一起更有意义,而不是期望用户在每个转弯处容忍延迟。

If the latter, you should lazy-load as much as possible. In other words, for example, instead of embedding all of the application's graphics into the SWF, load them with URLRequests or whatever method necessary when they are needed. A quicker launch will "feel" faster and more than make up for the increased HTTP requests over a short time.

如果是后者,你应该尽可能地延迟加载。换句话说,例如,不是将所有应用程序的图形嵌入到SWF中,而是使用URLRequests或在需要时使用任何必要的方法加载它们。更快的启动将“感觉”更快,并且比在短时间内弥补增加的HTTP请求更多。

#3


1  

I can think of two things to try.

我可以想到两件事要尝试。

First don't EMBED images, fonts, and other SWF files. This will cause them to be loaded at runtime instead, so this could affect performance when the page loads, but the SWF will be smaller.

首先不要使用EMBED图像,字体和其他SWF文件。这将导致它们在运行时加载,因此这可能会影响页面加载时的性能,但SWF会更小。

Also try splitting the application into several Modules. I know this improves the performance of the initial load time, but I don't know if it reduces the size of the top-level SWF.

还尝试将应用程序拆分为多个模块。我知道这可以提高初始加载时间的性能,但我不知道它是否会减小顶级SWF的大小。

#4


0  

Here I found many ways to reduce flex swf file size Check out on this link :
http://askmeflash.com/article/9/optimize-flex-swf-filesize-performance-loading

在这里,我找到了许多方法来减少flex swf文件大小查看此链接:http://askmeflash.com/article/9/optimize-flex-swf-filesize-performance-loading


推荐阅读
  • Html5-Canvas实现简易的抽奖转盘效果
    本文介绍了如何使用Html5和Canvas标签来实现简易的抽奖转盘效果,同时使用了jQueryRotate.js旋转插件。文章中给出了主要的html和css代码,并展示了实现的基本效果。 ... [详细]
  • 【MyBatis系列7】原来SqlSession只是个甩手掌柜,真正干活的却是Executor等四大对象
    Executor原理分析前言MyBatis架构分层ExecutorBaseExecutorSimpleExecutorReuseExecutorBatchExecutor三种常用批 ... [详细]
  • Chrome浏览器非常强大,使用Chrome浏览器对页面性能进行检测,根据测试的结果进行优化。当然这个结果只是参考,在实际的项目中肯定有特殊情况存在,并不能为了满足某项测试结果而忽略特定情况的存在。1 ... [详细]
  • smarty(模板引擎,模板技术)使用smarty主要是为了实现逻辑和外在内容的分离;特点:1、速度快 ... [详细]
  • IveseenquestionsaboutIDEshere--WhichisthebestIDEforScaladevelopment?andWhatisthe ... [详细]
  • Linux之DNS
    DNS服务器配置一、DNS概述:DNS是域名系统(DomainNameSystem)的缩写,是一种组织域层次结构的计算机和网络服务命名系统。它的作用是:把域名转换成为网络可以识别的 ... [详细]
  • 本文介绍了OC学习笔记中的@property和@synthesize,包括属性的定义和合成的使用方法。通过示例代码详细讲解了@property和@synthesize的作用和用法。 ... [详细]
  • 在说Hibernate映射前,我们先来了解下对象关系映射ORM。ORM的实现思想就是将关系数据库中表的数据映射成对象,以对象的形式展现。这样开发人员就可以把对数据库的操作转化为对 ... [详细]
  • FeatureRequestIsyourfeaturerequestrelatedtoaproblem?Please ... [详细]
  • Android自定义控件绘图篇之Paint函数大汇总
    本文介绍了Android自定义控件绘图篇中的Paint函数大汇总,包括重置画笔、设置颜色、设置透明度、设置样式、设置宽度、设置抗锯齿等功能。通过学习这些函数,可以更好地掌握Paint的用法。 ... [详细]
  • 本文介绍了OkHttp3的基本使用和特性,包括支持HTTP/2、连接池、GZIP压缩、缓存等功能。同时还提到了OkHttp3的适用平台和源码阅读计划。文章还介绍了OkHttp3的请求/响应API的设计和使用方式,包括阻塞式的同步请求和带回调的异步请求。 ... [详细]
  • Todayatworksomeonetriedtoconvincemethat:今天在工作中有人试图说服我:{$obj->getTableInfo()}isfine ... [详细]
  • 上图是InnoDB存储引擎的结构。1、缓冲池InnoDB存储引擎是基于磁盘存储的,并将其中的记录按照页的方式进行管理。因此可以看作是基于磁盘的数据库系统。在数据库系统中,由于CPU速度 ... [详细]
  • 单页面应用 VS 多页面应用的区别和适用场景
    本文主要介绍了单页面应用(SPA)和多页面应用(MPA)的区别和适用场景。单页面应用只有一个主页面,所有内容都包含在主页面中,页面切换快但需要做相关的调优;多页面应用有多个独立的页面,每个页面都要加载相关资源,页面切换慢但适用于对SEO要求较高的应用。文章还提到了两者在资源加载、过渡动画、路由模式和数据传递方面的差异。 ... [详细]
  • importcom.intellij.util.graph.DFSTBuilder;導入方法依賴的package包類privatesynchronizedvoidinitializ ... [详细]
author-avatar
-sunnydays
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有