This content has been marked as final. Show 1 reply
So I have been measuring the render time as the time it takes to go through addChild(). Here is what I found about how addChild() works. Which of these would or would not be related to the render time?
Flex performs the following actions:
a. Sets the parent property for the component to reference its parent
b. Computes the style settings for the component.
c. Dispatches the preinitialize event on the component.
d. Calls the component’s createChildren() method.
e. Calls the invalidateProperties(), invalidateSize(), and
invalidateDisplayList() methods to trigger later calls to the
commitProperties(), measure(), or updateDisplayList() methods during the
next render event.
The only exception to this rule is that Flex does not call the measure()
method when the user sets the height and width of the component.
f. Dispatches the initialize event on the component. At this time, all of
the component’s children are initialized, but the component was not sized
or processed for layout. You can use this event to perform additional
processing of the component before it is laid out.
g. Dispatches the childAdd event on the parent container.
h. Dispatches the initialize event on the parent container.
2. During the next render event, Flex performs the following actions:
a. Calls the component’s commitProperties() method.
b. Calls the component’s measure() method.
c. Calls the component’s layoutChrome() method.
d. Calls the component’s updateDisplayList() method.
e. Dispatches the updateComplete event on the component.
3. Flex dispatches additional render events if the commitProperties(),
measure(), or updateDisplayList() methods call the invalidateProperties(),
invalidateSize(), or invalidateDisplayList() methods.
4. After the last render event occurs, Flex performs the following actions:
a. Makes the component visible by setting the visible property to true.
b. Dispatches the creationComplete event on the component. The component
is sized and processed for layout. This event is only dispatched once when
the component is created.
c. Dispatches the updateComplete event on the component. Flex dispatches
additional updateComplete events whenever the layout, position, size, or
other visual characteristic of the component changes and the component is
updated for display.
Most of the work for configuring a component occurs when you add the
component to a container by using the addChild() method. That is because
until you add the component to a container, Flex cannot determine its
size, set inheriting style properties, or draw it on the screen.