8 Replies Latest reply: Jan 31, 2013 9:04 AM by nvhdab RSS

    Popup reaction is slow

    Bhargav_Flex Community Member


      I am in middle of developing a big application where I am using popups in various places. I have a "SuperPanel" as a container for all my popup windows. This is a customized panel which extends the Flex Panel container.


      In one particular scenario I have created a maximize button, clicking on which takes an ADG from the application and displays it on a Popup window. The ADG is a child of a VBox. Now when the user closes the popup the same ADG is collapsed to become a child of the previous container where our maximize button lied.


      Everything is working fine except for one thing that the creation of the popup and removal of popup is very slow. It takes more than 4.5 seconds for the popup to be seen on screen and also the same time to be removed from the screen.


      This is not the case for other popupwindows where I am displaying a different kind of data.


      What can be the reason for such a lag in popup display?


      Thanks in advance,


        • 1. Re: Popup reaction is slow
          Flex harUI Adobe Employee

          Use the profiler to find out.

          • 2. Re: Popup reaction is slow
            Matt Le Fevre Community Member

            Are you simply adding the old ADG? or are you instanciating a new one, adding it to the popup, then filling it with data again?


            Are you also creating the popup, adding the adg, then adding it to the stage, or adding it to the stage, then adding the adg? etc..

            • 3. Re: Popup reaction is slow
              Bhargav_Flex Community Member

              Thanks for the reply Matt.


              I am adding the old ADG and not creating a new instance.


              My flow in the maximize button click event handler is this way:

              • panel=SuperPanel(PopUpManager.createPopUp(UIComponent(this.parentApplication),SuperPanel,t rue)); 

                    //use PopUpManager.createPopUp for creating a new popup


              • panel.allowResize = true; panel.allowDrag = true; panel.allowClose = true; // Do all the resizing and other stuff for the panel


              • panel.height = Number((screenRect.height)*(8/10));
                panel.width = Number((screenRect.width)*(8.5/10));  // Here I am setting the size of poup so as to keep it proportiante to browser window size.


              • panel.addEventListener(CloseEvent.CLOSE, function(event:CloseEvent):void{
                            });     // Here I am adding a listener for the close event


              • panel.addChild(gamesConfigurationVbox);        // This is the most critical step of adding the Vbox containing my ADG.


              • PopUpManager.centerPopUp(panel); //Centering Popup


              • irisIn.end();
                irisIn.play([panel]);  // Playing few effects for the popup.


              I hope the above code helps to make the whole scenario clear.


              Let me know if you need anything more.

              • 4. Re: Popup reaction is slow
                Bhargav_Flex Community Member

                Thanks for the reply Flex harUI.


                Unfortunately I am not using the Premium License. I would like to see the profiler in action.


                I have seen lots of positive feed back for the same on google, but my company is happy with the standard edition.


                Thanks for the suggestion though.

                • 5. Re: Popup reaction is slow
                  Flex harUI Adobe Employee

                  Well, before we had a profiler, we would sprinkle in getTimer calls to see

                  where the gaps were.


                  IMHO, it will save your company money to get you one premium license so you

                  can use the profiler instead of using getTimer

                  • 6. Re: Popup reaction is slow
                    Bhargav_Flex Community Member

                    Thank you for the feedback and I will definitely talk to my senior about



                    Also since you are an Adobe employee, I would like to ask one more thing.

                    How can I make my Flash Builder 4 ignore the SCCS files which are generated

                    by my revision control?


                    I tried to modify the plugin.xml file to include s.* file in the filters of

                    FB but I am denied any modification in the file. I have a Win 7 and logged

                    in as Administrator. Still when I open the file in wordpad, modify and then

                    save the file it says that access to that file was denied.


                    Some light in this will really reduce my search time among folders.





                    • 7. Re: Popup reaction is slow
                      Bhargav_Flex Community Member

                      Sorry for the delay but I had found the solution to my problem.


                      It was silly of me to pass a parent of the current component as parent to the popup. It should have been the component itself or the application.


                      With the change in the parent the popup is acting as required.


                      Thank you all for looking into my problem.



                      • 8. Re: Popup reaction is slow
                        nvhdab Community Member

                        A little late, but thanks komal harkut! I was having the same problem, but with

                        myPopup.open(FlexGlobals.topLevelApplication as DisplayObjectContainer, true)

                        I actually saved 3-4 seconds!

                        Although, with retina displays and Flash 11.5 it is still quite slow (everything looks slower actually) so I guess I'll have to run the profiler again and start switching to images instead of vectors. :(