Tips for How to get performance in flex mobile application.
General Tips and some fundamentals that should be remembered while creating any flex mobile application.
2. General Overview
Use Light-Weight Components
General Tips
Use Mobile Spark Components
ItemRenderers in Flex Mobile Application
User Mobile ItemRenderers
Use on Demand Scroller
3. Use Light-Weight Components
Label – Label is a single styled Light-Weight
component and used for static text in Desktop
and Mobile
RichText – RichText is multi-styled heavy
component
RichEditableText – RichEditableText is
heaviest component which gives selection
and edit features and used by TextInput and
TextArea in Desktop
4. General Tips
Use cacheAsBitmap Property – Components
those are not changing frequently but are
redrawn often can be cached as Bitmap, so we
can optimize rendering time.
Use PNG images instead of JPG or GIF, because
it takes less image decoding time and rendering
time.
Continue….
5. General Tips
Don’t use BorderContainer, use Group + Rect
instead
6. Use Mobile Spark Components
StyleableTextField – (in Flex 4.5)
- Supports editing and selection for mobile
- Used by IconItemRenderer and LabelItemRenderer
- Can be used in AS3, not directly in MXML
Continue…
7. Use Mobile Spark Components
StyleableStageText (New in Flex 4.6)
- Native OS Control
Responsive Editing
Fast Scrolling
- Used by Mobile TextInput and TextArea
- Can be used in AS3, not directly in MXML
8. Item Renderers for Mobile Applications
Don’t create heavy ItemRenderers
Use Light-Weight Components
Reduce number of nested groups
Use cacheAsBitmap
Avoid complex Bindings
Use ContentCache Class for image caching
Continue…
9. Item Renderers for Mobile Applications
Use Mobile Item Renderers
IconItemRenderer
LabelItemRenderer
10. Other Tips
Use BitmapImage instead of Image Class
Convert your Graphics Elements to FXG
Convert FXGs to PNG images
Use on demand Scroller Class
Use Scroller.viewport instead of
Scroller.verticalScrollbar
11. Thanks
For more :
Visit : http://flexexpert.blogspot.com
Facebook : www.facebook.com/mitulgolakiya
Twitter: www.twitter.com/mitulgolakiya