Switching between two screens take a long time

47 views
Skip to first unread message

kpedia

unread,
Jul 24, 2013, 6:10:46 AM7/24/13
to google-we...@googlegroups.com
Hi everybody,

I'm a newbie with GWT. My problem is this :

I have a button in my home screen. When clicking on that button, I change the main panel and display others GWT elements into it. I don't make any RPC call.

It takes a long time when switching between two screens, so I want to make a wait indicator like an animated gif. I really try everything but it's notok.

How can I do that ?

Thanks

RyanZA

unread,
Jul 24, 2013, 3:02:51 PM7/24/13
to google-we...@googlegroups.com
You're probably doing a lot of work all at once to display the page, so it takes awhile to show up. You can either try to move some of the logic to deferred calls so it can run after the screen update, or you can first switch in a loading page, and then show your screen. The browser tab will still 'stop' while it loads your screen though, because javascript will block the UI while it runs (so an animated loading bar won't animate). Best UI would be to try and make the javascript do less work so it can display fast / not block.

salk31

unread,
Jul 25, 2013, 4:02:08 AM7/25/13
to google-we...@googlegroups.com
Have you tried profiling in the browser? If you set the GWT compiler output style to PRETTY it is pretty easy to profile in the browser dev tools. Just don't try and use IE (JS profiling is very broken).

Thomas Broyer

unread,
Jul 25, 2013, 4:19:54 AM7/25/13
to google-we...@googlegroups.com
Question answered on SO: http://stackoverflow.com/q/17833714/116472
"Problem" was DevMode, or more accurately complaining that DevMode is slow.


On Wednesday, July 24, 2013 12:10:46 PM UTC+2, kpedia wrote:

salk31

unread,
Jul 25, 2013, 4:22:45 AM7/25/13
to google-we...@googlegroups.com
Ah. The advantage of lurking in both places. I'm not sure I should be lurking on this one. I'm sure my wife could think of things she rather I did.
Reply all
Reply to author
Forward
0 new messages