background preloader

Performance / Optimisation / Conventions

Facebook Twitter

Mm.cfg Secrets « jpauclair. *Update: 9 dec 2011* This article was the very beginning of what became simply the best toolset for debugging and optimizing flash content: TheMiner. Using a few of these hidden features, TheMiner let you analyse memory, performances, DisplayList, loaders and a lot more! If you have a flash application that could benifit some optimization, TheMiner is the right toolset for you!

*end update* Read the Original Article (contains a lot of comments that might help you) I knew for a long time now that flash had undocumented features, little part of flash that could help speed up process (like the memory opcodes) or make interaction easy with right click and that kind of things. As you may know, The mm.cfg files is located in: Windows; C:\Documents and Settings\username\mm.cfgOSX; /Library/Application Support/Macromedia/mm.cfgLinux; home/username/mm.cfg This file is interpreted when a Flash Player instance launches a SWF and gives indication of what should or shouldn’t be done.

The Treasure. Garbage Collection with Flex and Adobe Air. I finally found some spare time to organize the stuff presented at flexcamp and make it a blog post. I “argue” with the Flex profiler almost daily and we had an “intense” relationship the month right before the flexcamp. So I felt a talk about profiling and Garbage Collection (GC) was really fit. Right, it is impossible to decouple profiling from GC. If you want to improve the memory management of your application you have to know how the Flash Player (and Adobe Air) manage memory allocation and deallocation.

Virtual Machine (VM) The flash player is based on a virtual machine (to be precise the machines are 2, one for actionscript2 and one for actionscript3). At startup the VM reserves some memory and when the code above is executed decides where the object goes in the application memory and how much space it takes. Garbage Collection So what can I do as a programmer? At startup the application reserves some memory to be used, say four blocks.

Memory Consumption Congrats! Caching. Flex Performance Re-Hash: The Elastic Racetrack | www.quilix.com. I believe that the "elastic racetrack" was coined by Ted Patrick of Adobe evangelism fame... and it does a fine job as a visual aid in explaining Flex application performance. So... here is a quick review of the elastic racetrack and how to get your Flex/AIR ponies running faster. By the way - this post is a summary of many great articles, materials, presentations I've collected. If you're hungry for more after reading... Google is your friend! On Teb! On! Flash’s refresh cycle is frame-based and can be divided into three groups of operations: script evaluation, invalidation, and rendering. The above image shows a frame that is divided equally between script evaluation/execution and rendering; which is ideal.

There are times when changing ‘stuff’ requires long running processes, synchronous calls, large code blocks, loaders, and etc. Script evaluation can be tamed by operating in sequence rather than in parallel; load your assets one after the other. Updated ‘Elastic Racetrack’ for Flash 9 and AVM2 « Craftymind. In 2005 Ted Patrick posted a great article on the frame execution model inside the Flash Player that he dubbed the ‘elastic racetrack‘. It’s served as a great reference for me over the years to help understand how code execution and rendering were balanced within the processing of a frame.

Since the introduction of Flash Player 9 and the new AVM2, I’ve noticed a few changes to the elastic racetrack model and thought I’d share them. This information is based on research into Flash player internals as well as observations I’ve made playing around with the event and rendering model, but the full model hasn’t been confirmed by Adobe engineers. The basic premise of the original elastic racetrack is still the same. Given a specific frame rate to operate on, the Flash player will devote the first segment of the frame to execute code, and the second segment to render display objects.

AVM2 is controlled by what I’m going to call the Marshal. So what does this all mean? Coding Conventions - Flex SDK - Adobe Open Source. Conventions for Bound Properties - Flex SDK - Adobe Open Source. Ten tips for building better Adobe AIR applications > Tutorials. Now that we have just launched AIR 2, I figured it would be a good time to look back at all the AIR code I've written over the last few months and pick out some of the best snippets and concepts to share with the community. This article describes ten techniques I've used to improve performance, usability, and security of AIR applications, and to make the development process faster and easier.

Now that we have just launched AIR 2, I figured it would be a good time to look back at all the AIR code I've written over the last few months and pick out some of the best snippets and concepts to share with the community. This article describes ten techniques I've used to improve performance, usability, and security of AIR applications, and to make the development process faster and easier: Requirements In order to make the most of this article, you need the following software: Adobe AIR 2 Download Prerequisite knowledge Tip 1: Keeping memory usage low Figure 1.

Always remove event listeners 08. 1. 3.

Modules

Tom Sugden: How to Unload Modules Effectively. Getting Started The best way to understand module unloading is to create a sample project and run some tests. Here's a sample Flash Builder project that uses Flex SDK 3.5 to demonstrate the effective unloading of a module. A number of practices are applied and these are described later. Download ModuleUnloading.zip The sample project contains an application that loads and unloads a module repeatedly, displaying the System.totalMemory reading. Click the image below to launch the application: You can click the "Load/Unload" toggle button to load and unload the module manually, or the "Run Stress Test" button to begin repeatedly loading and unloading the module for a given number of repetitions. [Unload SWF] Workspaces:MyWorkspace:ModuleUnloading:bin-debug:module:MyModuleStyles.swf [Unload SWF] Workspaces:MyWorkspace:ModuleUnloading:bin-debug:module:MyModule.swf This trace indicates that the module and associated compiled CSS SWF have both been successfully unloaded.

Take Care With Style Tags.