How to improve the performance by extending the MVCSBundle.as file?
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:
mxml:ContextBuilderTag
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
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Ondina D.F. on 20 Dec, 2013 10:15 AM
Hey robotlegs-fan,
For a typical MVCS setup without Modules and Logging you’d need at least these extensions:
VigilanceExtension,
ContextViewExtension,
EventDispatcherExtension,
LocalEventMapExtension,
EventCommandMapExtension,
CommandCenterExtension,
MediatorMapExtension,
ViewManagerExtension,
StageObserverExtension,
ManualStageObserverExtension,
StageCrawlerExtension,
StageSyncExtension
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.
SomeCustomBundle must implement IBundle in order to be installed.
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 :)
Ondina
2 Posted by robotlegs-fan on 21 Dec, 2013 07:19 PM
As always, thanks a lot yo.
Support Staff 3 Posted by Ondina D.F. on 23 Dec, 2013 09:20 AM
No problem!
Ondina D.F. closed this discussion on 23 Dec, 2013 09:20 AM.