Accessibility
Peter Ent

Peter Ent

Adobe

Table of Contents

Created:
24 November 2008
User Level:
Intermediate
Products:
Flex

Understanding Flex itemRenderers – Part 5: Efficiency

If you are displaying a large number of itemRenderers — either in the DataGrid or AdvancedDataGrid — your application's performance may be adversely affected if you do not code these itemRenderers efficiently. Here are some tips that might help:

  • Limit the number of columns using itemRenderers. Do you really need to have every column be a custom itemRenderer? Sometimes you do, but is all that glitz overwhelming the user?
  • Try not to change the style of the elements in your itemRenderer too frequenty. If you need to switch styles (for instance, green for positive values, red for negative values), consider having two controls preset with those styles and making one visible. Changing styles is one of the more time-consuming tasks in Flex.
  • Do not use Containers as the basis for your itemRenderers. Containers have a lot of overhead. They are fine for limited use, but it would be more efficient to write your itemRenderers based on UIComponent.

This series includes the following articles:

Requirements

In order to make the most of this article, you need the following software and files:

Flex Builder 3

Prerequisites:

To benefit most from this article, it is best if you are familiar with Flex Builder and ActionScript 3.0.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License

About the author

Peter Ent is a Computer Scientist at Adobe, working on the Genesis project. Prior to this, Peter worked for Adobe Customer Care as a Flex Support Engineer and then as a Technical Account Manager. Before joining Adobe, Peter worked in the financial services industry at State Street and Fidelity Investments. He also has experience at two start-ups building software applications doing imaging and molecular modeling. Peter holds a bachelor of science in Computer Science from Syracuse University. Visit Peter's blog.