To get a better handle on why things are taking so long, go grab the SpeedTracer extension for chrome at http://code.google.com/speedtracer
After you take a quick peek at your app, you can modify your app and annotate the timeline by making a JSNI call to $wnd.console.markTimeline() as described here: http://code.google.com/webtoolkit/speedtracer/logging-api.html It will give you some insight as to what is going on in the browser while you are waiting for that popup. On Tue, Oct 19, 2010 at 2:02 PM, Ben <ben.falc...@gmail.com> wrote: > Hi - I have created a Maps App with GWT involving PopupPanel's in > various roles - particularly i'd like to use one for a 'Please wait' > window while the Map gets updated. So, what i'm doing in p-code is: > > - define a PopupPanel P saying 'Please Wait' > - define a button B to do something > - in B's onclick() method do the following steps: > 1. immediately call B.show(); > 2. then go ahead and process many Map elements, setting them > visible(false), etc. > 3. then return. > > The issue is that popup P is NOT showing immediately when B is > clicked.. sometimes it shows only after a few moments as if it is > struggling to compete with the subsequent map operations (there are > *many* elements being manipulated in step 2, but only after step 1, i > thought!). The FIRST TIME I click the popup seems to be rendered > promptly. AFter that the popup doesnt render in time to really serve > as a 'please wait' popup..! > > Am i missing something with regard to sync'ing, or with the show() > method or .setVisible(true)? (i've tried that too). > Code snippet below: > > REDRAWING_DIALOG = new DialogBox(false); > REDRAWING_DIALOG.setStyleName("gwt-PopupPanel"); > HTML message4 = new HTML(".. html here "); > REDRAWING_DIALOG.setPixelSize(280, 100);//w,h > REDRAWING_DIALOG.setAnimationEnabled(true); > REDRAWING_DIALOG.setPopupPosition(400,250); > REDRAWING_DIALOG.setWidget(message4); > REDRAWING_DIALOG.hide(); > > ... > > key_ok_button.addClickListener(new ClickListener() { > public void onClick(Widget sender) { > > //show the 'Please wait' dialog > /* THIS SEEMS TO LAG AND THE DIALOG DOES NOT SHOW PROMPTLY! */ > REDRAWING_DIALOG.show(); > > if(MY CONDITIONS){ > if(showLS.isChecked())for(int i=0;i<LS.size();i++) > ((Marker)LS.elementAt(i)).setVisible(true); > > //now hide the dialog after a timeout > /* NO PROBLEMS WITH HIDING IT */ > timeoutTimer = new Timer() { > public void run() { > REDRAWING_DIALOG.hide(); //hide the 'please wait' dialog > timeoutTimer = null; > }//run > }; > timeoutTimer.schedule(3 * 1000); // timeout is in milliseconds > return; > }//no systems selected > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- Eric Z. Ayers Google Web Toolkit, Atlanta, GA USA -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.