Happy New Year everyone.

I eventually figured out this issue. Our code was outputting thousands of
images in situations where most of those images were not going to be
displayed based on actionscript logic. I have since re-factored the code to
do most of this work dynamically and the performance is now much better.


Snppet of re-written code

private function init():void
                        {
                                if (agentItem.Children!=null && 
agentItem.Children.length>0)
                                {
                                        var imgExpandCollapse:Image = new 
Image();
                                        imgExpandCollapse.id = 
"imgExpandCollapse"
                                        imgExpandCollapse.visible = true;
                                        imgExpandCollapse.percentHeight = 100;
                                        imgExpandCollapse.source = 
InitialStateOpen ? new arrow1() : new
arrow3();
                                        
                                        canvas1.addChild(imgExpandCollapse);
                                }
                                
                                var assetNameLabel:Label = new Label();
                                assetNameLabel.text = agentItem.Name;
                                assetNameLabel.percentHeight = 100;
                                assetNameLabel.x = 17   
                                assetNameLabel.width = canvas1.width*3/4;
                                assetNameLabel.setStyle('fontFamily', 'Segoe 
UI, Tahoma, Arial, Geneva,
Arial Unicode MS, Microsoft Sans Serif, Lucida Sans Unicode, Lucida
Grande');
                                assetNameLabel.setStyle("fontSize", 12);  
                                
                                canvas1.addChild(assetNameLabel);



--
View this message in context: 
http://apache-flex-development.2333347.n4.nabble.com/Slow-performance-1000-objects-tp57076p58050.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to