How to improve the performance by extending the file?

robotlegs-fan's Avatar


19 Dec, 2013 11:56 PM

Hi again nice people,
For the last 8 months I been building a monster-application with Flash Builder Spark Modules, I been used the default configuration:
mvcs:MVCSBundle/ mvc:MyAppContext/ /mxml:ContextBuilderTag
But I am a little bit worry about the performance at the start up ,so I wonder if there is any extension that could by avoid to initialize at :
context.install(TraceLoggingExtension, VigilanceExtension, InjectableLoggerExtension, ContextViewExtension, EventDispatcherExtension, ModularityExtension, DirectCommandMapExtension, EventCommandMapExtension, LocalEventMapExtension, ViewManagerExtension, StageObserverExtension, MediatorMapExtension, ViewProcessorMapExtension, StageCrawlerExtension, StageSyncExtension);

In order easy the CPU boost at the start up.

Another relative question: Which light extensions config is recommended for Flex Mobile Application ?

Thanks for advance

  1. Support Staff 1 Posted by Ondina D.F. on 20 Dec, 2013 10:15 AM

    Ondina D.F.'s Avatar

    Hey robotlegs-fan,

    For a typical MVCS setup without Modules and Logging you’d need at least these extensions:
    You can create your own Bundle containing only the extensions that you really need in your app. You'd have to experiment with different bundles.

    _context = new Context()
        .configure(new ContextView(view));

    SomeCustomBundle must implement IBundle in order to be installed.

    But I am a little bit worry about the performance at the start up ,so I wonder if there is any extension that could by avoid to initialize at :

    I don't think that the performance of your app is suffering only because of installing the default robotlegs extensions. There must be something else going on during your bootstrapping process that slows down your app. Build a very simple app - without components and mappings - where you just create a context and install the needed extensions, and watch its performance. First, watch it with the default MVCSBundle installed, then with your custom one, where you comment out TraceLoggingExtension, InjectableLoggerExtension and ModularityExtension. Of course, the fewer extensions are installed, the better the performance, but I think what you're observing as a performance bottleneck, is when the extensions responsible for watching the views landing on the stage are starting to do their work. If you'd watch StageCrawler, StageSync, StageObserver, you'd see that they are the most expensive ones. The higher the number of components landing on stage, the more work they'll have to do, thus the worse the performance.

    Now, just watch the memory usage and performance of an app that's not using any frameworks. Increase the number of components on the stage gradually and capture app's performance.
    So, I think that maybe you're loading too many "things" at start up (assets/data), or your first View is containing a great number of components, so that you might want to consider another setting for your bootstrapping process? But, that's just a presumption, because I don't know anything about your settings.
    If, after testing your app with different set ups, you still think that robotlegs is the problem, please try to build a bare-bone app reproducing the issues and attach it to your post or at least let us know about your findings :)


  2. 2 Posted by robotlegs-fan on 21 Dec, 2013 07:19 PM

    robotlegs-fan's Avatar

    As always, thanks a lot yo.

  3. Support Staff 3 Posted by Ondina D.F. on 23 Dec, 2013 09:20 AM

    Ondina D.F.'s Avatar

    No problem!

  4. Ondina D.F. closed this discussion on 23 Dec, 2013 09:20 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac