Table of Contents |
Increase Code PerformanceActionScript is not compiled to native machine code like some languages (such as C++). Instead it is converted to bytecode, which is faster than an interpreted language but not as fast as native code. Although ActionScript can be slow, in most multimedia presentations, the assets such as graphics, audio, and video-and not the code-are often the limiting performance factor. Furthermore, the overall performance (or apparent performance from a user perspective) is also affected by download times and not just runtime execution. Of course, for a Rich Internet Application accessing a back-end database, performance might depend on the speed of database queries, data transmission, and text rendering. Many hacks throughout this book cover ActionScript optimization. Furthermore:
Although properly written ActionScript doesn't usually constitute a bottleneck, improvements can always be made. For those with an interest in ActionScript optimization, have a look at the following links:
Throughout this chapter, we'll explore ways to analyze and optimize performance in areas that are most likely to meaningfully affect runtime performance, download times, and the user experience. As with most topics, the optimal techniques depend on the situation, and there is often a trade-off between, say, performance versus convenience or download times versus runtime performance. The following hacks will help you make intelligent choices for your individual projects. You can find numerous other optimization-related hacks throughout the book, such as how to optimize sound [Hack #58] and optimize character animations [Hack #28] . |
Table of Contents |