20 x Tips to better Optimize your Flash

Slides:



Advertisements
Similar presentations
Drawing, Skinning and Degrafa This presentation covers drawing, skinning and the use of Degrafa to make things easier. Understanding the basics of drawing.
Advertisements

Flex Component Life-cycle. What is it? Sequence of steps that occur when you create a component object from a component class. As part of this process,
Microsoft Windows NT Embedded 4.0
1What is the Stage. 2How do you open a panel in Flash
FireMonkey Deep Dive The Next Generation of Business Application Development.
Flash Player Basics Presented By Ashish Desai 1. Flash Player Basics 2 Began with FutureWave Software (a drawing application) co-created by Jonathan Gay.
Android Platform Overview (1)
Chapter 6 Preparing and Publishing Applications. Chapter 6 Lessons 1.Publish movies 2.Reduce file size to optimize a movie 3.Create a preloader 4.Publish.
CIS Game Design I Sprite Sheets Blake Farrugia 10/10/2011.
Mobile Application Development
Microsoft ® Official Course Developing Optimized Internet Sites Microsoft SharePoint 2013 SharePoint Practice.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Sitefinity Performance and Architecture
Chapter 17 Putting It All Together. Viewing the Preloader To view the preloader, 1.CTRL-Enter to test the movie. 2.View > Simulate Download.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Create with SharePoint 2010 Jen Dodd Sr. Solutions Consultant
Technical Workshops | Esri International User Conference San Diego, California ArcGIS Viewer for Flex – Advanced Topics Lloyd Heberlie Björn Svensson July.
© 2012 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Do not redistribute. Adobe Gaming SDK Casual Connect Europe 2013 Tom Krcha.
MDCFUG TeraTech, Inc Adobe Flash 9 By Michael Smith TeraTech.
CSE 381 – Advanced Game Programming 3D Game Architecture.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
BUILDING RICH MEDIA ELEMENTS. Design Decisions Based on Design Specification  Following the design specification will ensure that the application is.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Edge Animate CreateJS is a suite of modular libraries and tools which work together to enable rich interactive content on open web technologies.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Unit and Functional Testing Your Flex Applications Mike Nimer Dir. Of Engineering nomee.com.
Macromedia Flash CS4. What is Flash CS4? –Animation and interactive authoring program –Tools for complex animation, as well as excellent drawing tools.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
© 2012 Adobe Systems Incorporated. All Rights Reserved. Copyright 2012 Adobe Systems Incorporated. All rights reserved. ® INTRODUCTION TO FLASH ANIMATION.
® Copyright 2008 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH CS3.
® Copyright 2010 Adobe Systems Incorporated. All rights reserved. ® ® 1 INTRODUCTION TO ADOBE FLASH PROFESSIONAL CS5.
UNDERSTANDING ADOBE FLASH. The Flash Interface  The flash interface provides you with:  A menu bar  Panels  A work area: stage.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California ArcGIS API for Flex.
2006 Adobe Systems Incorporated. All Rights Reserved. 1 Flex architectural patterns James Ward Technical Evangelist
ColdFusion 9 and Flex 4: Application Development Ryan Stewart Platform Evangelist, Adobe Systems
Dr. Rado Kotorov Technical Director Strategic Product Mgt. Jeff Shein Technical Manager Creating Web 2.0 Rich Internet Applications (RIA) and Dashboards.
3461A Readings from the Swing Tutorial. 3461A Overview  The follow is the Table of Contents from the trail “Creating a GUI with JFC/Swing” in the “The.
CHAPTER TEN AUTHORING.
Tutorial 8 Programming with ActionScript 3.0. XP Objectives Review the basics of ActionScript programming Compare ActionScript 2.0 and ActionScript 3.0.
Tutorial 7 Planning and Creating a Flash Web Site.
© 2006 IBM Corporation Agile Planning Web UI. © 2006 IBM Corporation Agenda  Overview of APT Web UI  Current Issues  Required Infrastructure  API.
C# GUI - Basics. Objectives.NET supports two types: WinForms, traditional, desktop GUI apps. WebForms – newer, for Web apps. Visual Studio.NET supports.
CISC 110 Day 5 OOP Part 2. 2 Outline The Display List Display List Classes Adding and Removing Objects Adding Symbol Instances Managing Object Depths.
XP Tutorial 8 Adding Interactivity with ActionScript.
PERFORMANCE ENHANCEMENT IN ASP.NET By Hassan Tariq Session #1.
Introduction to Interactive Media Interactive Media Tools: Authoring Applications.
Reading Flash. Training target: Read the following reading materials and use the reading skills mentioned in the passages above. You may also choose some.
© 2011 Delmar, Cengage Learning Chapter 10 Using ActionScript to Enhance User Experience.
XP Tutorial 7 Creating a Flash Web Site. XP New Perspectives on Macromedia Flash 82 Objectives Plan and create a Flash Web site Create a Flash template.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
INFORMATION SYSTEM – SOFTWARE TOPIC: GRAPHICAL USER INTERFACE.
DEV394 Windows Forms Performance Tips And Tricks Mike Henderlight Development Manager.NET Client Team Microsoft Corporation
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
® Copyright 2008 Adobe Systems Incorporated. All rights reserved. Creating New Components in Flex 3 and Beyond Deepa Subramaniam Flex SDK
Adobe Flash Professional CS5 – Illustrated Unit E: Optimizing and Publishing a Movie.
丁建文 國立高雄應用科大資管系副教授 兼任計網中心軟體發展組組長 跨平台行動應用軟體開發技術 : HTML5 & Mobile JavaScript Framework 暨南大學.
® Improving Flash Performance Amitt Mahajan, Zynga SOCIAL SPEED.
Efficient Game Graphics From Flash MX 2004 Game Design Demystified.
Contact us: Call: , , Mail: Visit:
Flash Session 4: Importing Assets
Actionscript 3 Graphics Programming
Introduction to Operating System (OS)
CMPE419 Mobile Application Development
AVG 24th 2015 ADVANCED c# - part 1.
CMPE419 Mobile Application Development
Presentation transcript:

20 x Tips to better Optimize your Flash

#1: Flash Player 10.1 “out of the box” optimization Instance Management Screensaver Mode NativeApplication.nativeApplication.systemI dleMode = SystemIdleMode.KEEP_AWAKE; GPU Hardware Acceleration

#2: Profiling ur App Flash Benchmark 8: or Flash Builder Profiler Profiling with System Tools Grant Skinner’s Benchmark AS3 FlexUnit 4.1 Benchmark FrameStats - Monitor Frame Rate Open Source Profiler -

#2: Profiling ur App OHHH…. I almost forgot!!! you can just do: getSize to find out the memory size of an object

#3: Architecting Micro-architecture frameworks?

Tip #4: I/O AMF, RTMP. Use James Ward’s tool to benchmark and see the memory difference: Use lazy loading whenever possible. Strong type the data with AMF on client and server side to increase performance.

Tip #5: Manipulating swf Framerate Reducing fps when your app is inactive Increase the fps once the app is active again Increase fps while animation is playing to create a more smooth experience and keeping a stack of all the animations being played to know when we can drop the fps. Provide a cross platform API (Pure AS3, Flex, AIR) framerateManager:FrameRateOptimizer = new FrameRateOptimizer( this, true );

Tip #6: Reduce memory usage Memory leaks due to listeners that have been set by us or someone else and never removed from memory: Solution: Listeners API movieClip.addEventListener( listeners.type = MouseEvent.CLICK, listeners.handler = onClick ); movieClip.addEventListener( listeners.type = MouseEvent.DOUBLE_CLICK, listeners.handler = onDoubleClick ); listeners.removeAllListeners( movieClip );

Tip #7: Avoid memory leaks Call gc twice, or in AIR system.gc(): Ensure GC will do his job correctly: Set weekly references - where possible: addEventListeners and Dictionary classes. Don’t keep references - nulling objects with events don’t unhook them.

Tip #8: Update screen once per frame Elastic Racetrack Frame starts - Event.ENTER_FRAME Frame actions executed - Event.FRAME_CONSTRUCTED End of Frame cycle - Event.EXIT_FRAME Pre-render phase starts - Event.RENDER Final user code is executed Player renders changes to display Cycle completed Avoid using updateAfterEvent, since it interrupt the Player and increases the player work load. Handle invalidation on your own using the stage.invalidate() property

Tip #9: Decrease nesting

Tip #10: Reduce complexity Shape Constructor code of children executed: 276 Sprite Constructor code of children executed: 399 UIComponent Constructor code of children executed: 1078 Group Constructor code of children executed: 1195 Use low level classes such as TextField, SimpleButton (when possible) over halo and Spark. It will require more coding but will improve performance. Avoid using TLF - when possible. Use Halo components over Spark components. When creating custom components use Sprite over MovieClip and UIComponent over Group When creating graphics it’s recommended to use Shape display object. TextField Constructor code of children executed: 68 Player renders changes display list: 168 mx:Text Constructor code of children executed: 743 Player renders changes display list: 685 s:Label Constructor code of children executed: 1136 Player renders changes display list: 198 s:RichText Constructor code of children executed: 416 Player renders changes display list: 3224

Tip #11: Avoid expensive operations Bitmap filters and perspective distortion Frequently-updated Text

Tip #12: Decreasing execution time Primitives vs generic object Typing over generic objects Loops Array vs ByteArray vs Vector Callbacks and events Regex and search string Databinding Sealed vs. dynamic classes if...else statements Use strict mode Flex related tips Use e4x with caution Increasing rendering speed Manual cache as BitmapData or Bitmap Cache as bitmap matrix Set all children caching policy Check the status of all children

Tip #13: Avoiding initializing and reference to unused classes

Tip #14: Set redraw region to min

Tip #15: Reducing swf file size Limit font unicode-range Implement RSL in your project - Runtime Shared Libraries Load assets on runtime and reduce assets file size Export Release Build Using strict mode

#16: Use Tools to reduce swf file size Apparat SWF Optimizer

Tip #17: Splitting apps into modules

Tip #18: Reuse objects - Object pooling

Tip #19: Working with external assets caching data in the memory cache data on the local device Image blitting

#20: be poactive & keep optimizing Be Proactive: take into account benchmark and memory usage when writing your code. Write code first: create your application and after it’s running, take time to optimize.

Q&A mobile-optimi.html mobile-optimi.html flash-content-and-imp.html flash-content-and-imp.html

24