Create custom components in ActionScript. Dont use mxml
Make sure you use ArrayCollections at a minimum.
Write eventlistener in creationComplete using addEventListener()..
remove eventlisteners when not required.
remove static linking(compile the mxml as following ... mxmlc filename.mxml -static-rsls=false).
make use of DataBinding at a minimum.
Dont unnecessarily convert objects of the same type. for example, var str:String = myname.toString().. here, 'myname' is already a string..so there is no need to convert it again.
Dont use states.States eat up the memory. Try using Modules.They are the best for flex applications.
Mark this correct if helpful..
I'm doing already that. It's not the creation of components which takes time but the display...
Based on some tests I have just done, I don't see this getting any faster other then buying new hardware
But why might think it should go faster?
And of what relevance is a test that creates 10000 TextInputs?
10.000 textInput it's to represent one of my tabulation which contains more than 5000 control (it's a customer request ><)
For me, it should be faster if I can display control which is really displayed. And when the customer scroll down or up, it create other component.
But, I found a solution with itemRender/userVirtualLayout, it should work...
Ahh okay, but yes use a List with a custom ItemRenderer.
You could also do pagination.
those customers should be lined up, shot and executed.
are you sure there is no other approach, than to use 10,000+ UI controls?
He said he would use List and useVirtualLayout, so he doesn't create 10000+ controls, only the number of visible in the list +1
Sorry for my english, I say that I'll use item renderer with dataGroup
Seems to work, great