翻译 2007年10月04日 21:13:00

Tips for better transition and effect performance in Flex



Modern man is an impatient beast. When it comes to using new technology, we expect it to be fast, smooth and (mostly) efficient. Which is why few things can be more detrimental to the experience of a new digital product than slow or choppy performance.


Earlier in the week I wrote about the value of using transitions, effects and animations to create better user experiences in both web applications and desktop software. If you’re a Flex developer, like me, working to create great experiences in rich internet applications, here are a few tips that could improve your application’s performance when it comes to transitions:


  • Suspend Background Processing: The obvious performance boost. Most effect classes have a public property suspendBackgroundProcessing that when set to true will disable any background processing (measurement and layout calculations) while the effect is playing. This will also prevent your effect from being disrupted while playing, which means that if you’re waiting for an event to complete the effect, you might end up waiting a very, very, very, very long time.

暂挂后台的处理:这是最明显的性能提高,大部分的性能基类有一个称做suspendBackgroundProcessing 的共有属性,如果设置为TRUE ,那么当效果播放的时候,将暂缓任何后台的处理(测量以及布局计算),这样同样可以组织你的效果在播放的时候被打断,例如如果你在等待某个事件发生完成这个效果,你也许最后要等待很长很长的时间

  • Don’t Use Deferred Instantiation: Deferred instantiation is usually a good thing. It speeds up application launch time by preventing unnecessary instantiation of components before they are actually needed. Navigators like the ViewStack and TabNavigator use deferred instantiation automatically, loading child components only as they are needed. Unfortunately, this also gets in the way of smooth transition performance (at least for the first time that a transition is played) because instantiation will occur mid-transition. Setting the creationPolicy property to “all” on Containers and Navigators will mean an up-front hit in application load time, but better performance for transitions between views. Your call.

不要使用延迟的实例化:延迟的实例化通常是件好事情,它通过阻止不必要的组件在需要之前实例化从而能够加速程序的加载,导航器例如(VIEWSTACK,TABNAVIGAOR)自动使用延迟的实例化,只在需要的时候才去加载其子组件。很不幸的是这确实也妨碍了效果的顺畅播放,至少是效果第一次播放的时候,因为实例化在过渡效果的中途实例化,将属性creationPolicy 设置为ALL(对容器,导航器而言将意味着装载的时候全部完成实例化,转载时间也将延长,但是在不同的视图之间切换的时候获得更好的性能)你需要的

  • Hide Things That Don’t Need to Be Shown: Finally, you can and should hide any elements of your view that don’t need to be shown to the user during transition playback. This reduces the load on the CPU simply because there is less to animate.






源文档 <http://voisen.org/archives/2007/10/03/transition-tips/>


Flex/Flash 程序技巧, 界面效果、特效

Flex/Flash 程序技巧, 界面效果、特效 Font Embedding in AS3 : Lessons Learned - Flaver ...

Android buttom textview 颜色平滑过渡的动画效果

TransitionDrawable transitionDrawable = new TransitionDrawable( new Drawable[] { defau...


  • 2012年04月25日 23:20
  • 1KB
  • 下载

Matriel Design 加载过渡效果

  • 2017年01月12日 17:14
  • 7.27MB
  • 下载

JQuery Mobile 页面过渡效果设置

系统帮助 $(document).ready(function(){ $('#default').bind('click', function() { $.mobile.loadin...


  • 2010年01月07日 11:46
  • 606KB
  • 下载


2017年11月25日 由于最近在写一个web项目,由于前端框架开发,和后台查数据的语法不成熟导致页面加载速度过慢,遂想到用loading效果来过渡: 粗略的查阅了下网上的实现方法...