Hi, 

I'm working on an app that works with a lot of search results and item 
renderers to display the search results.  The renderer is usually a VBox with a 
lot of HBoxes or GridRows within it.  The developer who put these together just 
used includeInLayout=false for the HBoxes or GridRows that weren't being used.  
This seems to be a bad idea since there are usually 25-30 renderers on the 
screen at a time, each with about 10-15 unused layout containers.  

I am going through and optimizing them now, and started setting the 
creationPolicy to none on all the items, and where they were previosuly being 
made visible, I call createComponentsFromDescriptors() on the layout container. 
 This seems to cut rendering time in about half.  I am wondering if there might 
be any unforseen issues I may have using this method.  In the code, the 
textfields(which are the children of the layout containers) are being populated 
in the very next line after I call the createComponentsFromDescriptors() 
method.  I am a little surprised that the container's children are initialized 
so quickly to be able to be accessed and take properties.  Is this safe to do?  
Or should I listen for some initialization events before setting any properties 
on the child components as a failsafe?

Thanks in Advance,

Adam

Reply via email to