以下截錄自一個adobe 工程師的blog
http://www.kaourantin.net/2005/09/some-word-on-blend-modes-in-flash.html
Some word on blend modes in Flash Player 8
Blend modes is one of those features who were long thought impossible to do in the Flash Player. And to be frank, it was indeed the most difficult feature I worked on during this release. Something to understand here is that blend modes are not implemented through the bitmap caching feature like the filters, but it's actually part of the core vector renderer. The two main advantages here are that using blend modes will not use excessive amounts of memory and use the shortest path possible in the rendering pipeline making it acceptable speed wise.
Nevertheless there are some things which need to be understood about this feature. It has limitations performance wise. In fact anytime you use a blend mode, all of the vector content in a particular region of your movie will be handled as it was partially transparent. And as you might know using transparent vectors can be a bit slow if used too graciously. Experiment and see where they are useful, but do not overuse them. Sometimes precompositing or using bitmap caching might help.
以下轉自adobe 官方論壇
Alpha blending
http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36c11f3d612431904db9-7ffe.html
Avoid using effects that require alpha blending when using the alpha property, such as fading effects. Keep in mind that alpha blending is processor-intensive for Flash Player and can hurt performance on slow devices.. Avoid using the alpha property, when possible.
2010年11月4日 星期四
2010年3月17日 星期三
Performance issues
Understanding Garbage Collection in Flash Player 9
Resource Management Strategies in Flash Player 9
Performance Report by Jackson Dunstan
Accessing Object ( "[]"operator, "." operator, "in" operator, "hasOwnProperty()" comparison, written by Jackson)
Activation Object( The cost of function closure, written by Jackson)
When measuring Flash runtime performance, always be sure to test in the release version, not in the debug version. The release version is often more than two times faster than the debug version. (Essential AS3 p.666)
Performance Report by Jackson Dunstan
Accessing Object ( "[]"operator, "." operator, "in" operator, "hasOwnProperty()" comparison, written by Jackson)
Activation Object( The cost of function closure, written by Jackson)
When measuring Flash runtime performance, always be sure to test in the release version, not in the debug version. The release version is often more than two times faster than the debug version. (Essential AS3 p.666)
2010年3月5日 星期五
Codes in Class Initializer
public class A{
//codes here.
public function A(){ }
}
When ActionScript defines a class at runtime, it automatically creates a method named the class initializer and executes that method. In this class initializer, ActionScript places all the class's static variable initializers and all class-level code that is not a variable definition or a method definition.
Code in the class initializer runs in interpreted mode, and is not compiled by the JIT compiler. Because JIT-compiler code generally executes much more quickly than interpreted code, you should consider moving processor-intensive code out of the class initializer when performance is a priority.
訂閱:
文章 (Atom)