The first question is, do you need Vbox functionality, punk? ;)  If so,
then you are stuck with it.  If you are just using it to lay out static
vertical display, then there may be other approaches.  Layout containers
are very easy to use, but are "heavy" (slow)

 

Next thing is they way you are doing things, you are forcing the Player
to render up to (20 * 6) visual objects.  They must be pretty simple
components, because 3 seconds is pretty good. If they were complex, you
would be looking at much longer delay. 

 

Does this process produce elements that are not visible, ie scrollbars?
If yes, then why would you want to render (make visible) things you
can't see?

 

The list-based controls and item renderer mechanisms are designed to
minimize rendering of visual objects, which is, and has always been, the
player's performance bottleneck.

 

Consider replacing addChild and Vbox with a List and a custom item
renderer.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason Reynolds
Sent: Tuesday, September 23, 2008 4:32 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Speeding up draw time with nested VBoxes

 

Hi, I have a component that extends VBox. I am making around 20
instances of this component. That component also contains a VBox, each
of which contains 2-6 components.

This takes a long time from creation to when I can see it on the screen
-- around 3000ms.

 

If I don't use a VBox in that 2nd component, it shaves around 700ms off
the time.

If I take out all my addChild's from the main component that is creating
all of this (just creating the components) the total time is around
30ms.

 

Is it the VBox that is hurting my performance by nature? And does anyone
have any suggestions to speed it up? This is my first real performance
problem since I started using flex. I know it's not the same, but with
AS2 I could make 10X more display objects and not see this kind of
performance.

 

Any help is appreciated!

Jason

 

Reply via email to