Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flash Player Developer Center /

Performance improvements in Flash Player 8

by Emmy Huang

Emmy Huang

Created

26 September 2005

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flash Player garbage collection performance

Maybe it's not as sexy as alpha video or a drop-shadow filter effect but the improved performance of Macromedia Flash Player 8 is a feature you can immediately benefit from—without doing a thing. One of the biggest contributors to the overall performance boost is the new garbage collection scheme, which improves ActionScript execution while reducing player memory usage.

Additionally, several changes to Flash Player 8 that are specific to the Macintosh platform result in greater parity between Windows and Macintosh performance. With these changes, you could see up to a 50% increase in the overall performance of Flash Player 8 when viewing content and applications.

Big boost from the new garbage collector

The new garbage collector in Flash Player 8 is the main driver of performance boosts in ActionScript execution and reduced memory usage. As the size and complexity of Flash applications increased, we were starting to reach the limits of the reference-counting algorithm used for garbage collection in Flash Player 7. By switching from simple reference counting to deferred reference counting, we eliminated over 90% of the reference counting in Flash Player.

The overhead for reference counting in Flash Player 7 was approximately 20% of total execution time, which often resulted in rendering pauses for large applications. The new garbage collector reduces this overhead to only 1–2% of total execution!

Flash Player 8 also uses incremental garbage collection, which breaks up the operations for marking objects for deletion and the actual deletion step so that they can be run whenever there is a free cycle.

Because efficient garbage collection and memory usage are directly related, Flash Player 8 uses approximately 50% less memory than Flash Player 7. The garbage collection method used in Flash Player 7 resulted in almost linear use of memory. By contrast, using incremental garbage collection, the memory usage in Flash Player 8 performed more like a step function as chunks of memory were freed periodically during free cycles (see Figure 1).

Windows memory usage graph during a sample test pass View larger

Figure 1. Windows memory usage graph during a sample test pass (click to enlarge)

For the same test on Mac OS X, the garbage collection performed slightly differently: Flash Player freed memory mostly at the end (see Figure 2)

Mac OS memory usage graph during a sample test pass View larger

Figure 2. Mac OS memory usage graph during a sample test pass (click to enlarge)

As a result of the new garbage collector and lower memory consumption, most of your existing content should experience some improvements in speed when running in Flash Player 8—without any recompiling.

Yes, you can create a movie that runs slower in Flash Player 8

Although the overall performance of your content and applications will improve, the new garbage collector has some performance side-effects for specific areas. Some operations will be faster, while others will be slower when compared to the same operations in Flash Player 7. This is because the underlying infrastructure for supporting memory management has changed. As a result, microbenchmark tests, or small benchmark tests that measure a particular aspect of functionality, cannot really be used for an apples-to-apples comparison between older player versions and Flash Player 8.

For example, let's say you have a microbenchmark test that calculates an equation to exercise some math routines, and you run it five times in a row in the player. In Flash Player 7, it takes 300 milliseconds to calculate. That individual test will also take 300 milliseconds on each subsequent run. With the garbage collection in Flash Player 8, this same microbenchmark test might take 310 milliseconds the first time, 300 milliseconds the next time, and so on. The first time might be slower than in Flash Player 7 but subsequent runs would run faster, resulting in an overall average that is faster than Flash Player 7.

See a set of our sample Flash Player microbenchmark tests and results at the end of this article. The primary goal for performance is to improve overall application performance, not necessarily improve each individual microbenchmark. Microbenchmark tests are useful to us for checking that we aren't setting things back with the changes we make, but the important thing to note is that we have also added reference application benchmarks to our test suite for more complete testing of how overall performance is impacted.

Keeping it real on the Mac

With this release, we focused a significant amount of time and energy on player performance on the Mac to bring greater parity between Windows and Mac OS performance across all aspects, as well as increase stability. One of the big moves was rewriting the Mac plug-in to use the new "Mach-O" OS X runtime architecture, which allows the player to take advantage directly of the new technologies and features of the platform. We also spent a lot of time optimizing the core rendering routines specifically for the Mac.

To improve playback of video and large content and lower CPU usage, Flash Player 8 uses some OpenGL features when run in Safari on Mac OS X 10.2 and above. This is not full support of OpenGL; the player takes advantage of specific features to get bits on the screen faster. Using OpenGL improves video playback and animation, and reduces tearing or horizontal redraw lines.

Similar to the change in garbage collection, this feature improves the overall performance of rendering in Safari; however, in some cases performance may decrease. OpenGL also has some built-in limits and on older, slower systems Mac OS X will cap the frame rate to 30 frames per second. Why is it Safari only? The feature requires the browser to notify the player when a user creates a new tab or switches tabs, and at the time of this release Safari was the only Mac browser capable of supporting this feature.

Sample Flash Player microbenchmark tests and results

The following Sample Flash Player Microbenchmark Tests and Results (see Figure 3) are provided as an illustration of the types of performance tests Macromedia runs during the development of the player:

  • Tests results are from August 30, 2005, with Flash Player 7r19 and Flash Player 8r22 stand-alone players.
  • Time is measured in number of milliseconds. Percent change uses Flash Player 8 as the reference point, such as "Flash Player 8 is 51.5% faster than Flash Player 7 for the Boids test on Windows."
  • We used the following reference machines:
    • Mac OS 10.3 – 800 MHz – 256 MB RAM (1 CPU disabled on dual processor machine)
    • Windows XP SP2 – P3 1 GHz – 384 MB RAM
    • 32-bit resolution (no other applications running, no mouse movement, no special priority setting on process)
Sample Flash Player Microbenchmark Tests and Results View larger

Figure 3. Sample Flash Player microbenchmark tests and results (click to enlarge)

Where to go from here

Obviously, this is not a comprehensive list of performance enhancements that affect specific player features. Many changes and optimizations are deep under the surface, such as changing underlying internal data structures to use less memory or using floating-point matrices to improve rendering accuracy. Some enhancements make specific functionality faster, while others might make performance trade-offs in order to support cool new functionality. When taken as a whole, the overall effect of the performance features and optimizations in Flash Player 8 makes for a smoother, faster experience for your content and applications.

To learn more about Flash Player, visit the Flash Player Developer Center.

To learn more about Flash Player 8 features, visit the Flash Player Features page.

More Like This

  • Resource management strategies in Flash Player 9
  • Understanding garbage collection in Flash Player 9

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement