Flex Application performance improvement

Flex Application’s performance improvement

1)   Flex Profiling
2)   SWF size improvement
3)   Loading styles dynamically

1. Flex Profiling:
      By using Flex Profiling we can identify performance bottlenecks and memory leaks in your application.
Flex Profiler records data about the state of the application, including the number of objects, the size of those objects, the number of method calls, and the time spent in those method calls.

 Types of profiling:

Before you use the profiler, you should decide what kind of profiling you are going to do: performance profiling or memory profiling.
Performance profiling:  is the process of looking for methods in your application that run slowly and can be improved. Once identified, these hot spots can be optimized to speed up execution times so that your application runs faster and responds more quickly to user interaction. You generally look for two things when doing performance profiling: a method that is called only once but takes more time to run than similar methods, or a method that may not take much time to run but is called many times. You use the performance profiling data to identify the methods that you then optimize. You might find that reducing the number of calls to a method is more effective than refactoring the code within the method.
Memory profiling: is the process of examining how much memory each object or type of object is using in the application. You use the memory profiling data in several ways: to see if there are objects that are larger than necessary, to see if there are too many objects of a single type, and to identify objects that are not garbage collected (memory leaks). By using the memory profiling data, you can try to reduce the size of objects, reduce the number of objects that are created, or allow objects to be garbage collected by removing references to them.

2. SWF Size reduction techniques:
1)     RSL
2)     Modules
3)     Bin Release Version
RSL (Runtime Shared Library):




            One way to reduce the size of your applications' SWF files is by externalizing shared assets into stand-alone files that can be separately downloaded and cached on the client. These shared assets can be loaded and used by any number of applications at run time, but must be transferred only once to the client. These shared files are known as Runtime Shared Libraries or RSLs.
Steps: Right Click on the Project, go to Properties.
Modules:
            Modular development is an approach to software design and architecture that separates application components into separate logical components, or modules. Each module is a logical grouping of functionality, thus common logic and common tasks are bundled into the same module.
Modules are SWF files that can be loaded and unloaded by an application. They cannot be run independently of an application, but any number of applications can share the modules.
Modules let you split your application into several pieces, or modules. The main application, or shell, can dynamically load other modules that it requires, when it needs them. It does not have to load all modules when it starts, nor does it have to load any modules if the user does not interact with them. When the application no longer needs a module, it can unload the module to free up memory and resources.
Modular applications have the following benefits:
·         Smaller initial download size of the SWF file.
·         Shorter load time due to smaller SWF file size.
·         Better encapsulation of related aspects of an application. For example, a "reporting" feature can be separated into a module that you can then work on independently.
Bin Release Version:  By default Output SWF files contain debugging information. We can use bin-release option to remove all the debugging information, so that your SWF file size is decreased.




Tags: ,

0 Responses to “Flex Application performance improvement”

Post a Comment

Thanks for your comments

Subscribe

© 2014 Java Frameworks. All rights reserved.
Designed by Blogger