This content has been marked as final. Show 4 replies
Also, I do manipulate other properties (width, height, x, y etc) in my real code...not sure whether or not that makes a difference.
Really, this is not the correct approach.
By far, the slowest part of a Flex app is rendering components, this is why Adobe has put so much effort into optimizing the List-based components. 100 instances of any moderately complex ui element is going to be unacceptably slow.
True, making a custom ItemRenderer, that works efficiently is not trivial, but the benefit is amazing.
I advise that you use a simple mx:List, and create an itemRenderer with your three controls. Now hear this: DO NOT START FROM SCRATCH! ItemRenderers are not rocket science, but they are not trivial either. To work right they need to be coded right. Start with the Adobe ListItemRenderer.as. The code is in the frameworks folder.
OR, find Alex Harui's blog on itemRenderers.
Use your custom components in a mx:Repeater. BUT, you must restrict the number of visible instances to some reasonable number, like 10. Set the renderer count to this, then use a "paged" navigation instead of a scrolled nav. Use "next", "prev" "Page Up", End...etc buttons to set the Repeater start index.
The key is to minimize the number of visual elements that the Flash Player needs to create.
Thanks for your reply Tracy. I assumed that there was something wrong with the approach I was using.
I'm going to play around with itemRenderer and Repeater when I get a chance. I feel like I might have more luck with the former, since the particular use I need this for won't work with "paged" navigation; it disrupts the flow of what I'm trying to do.
Anyone else have any insights? Does anyone have experience with itemRenderer that can lend a few more pointers?