Tuesday, October 27, 2015

Re: Progress bar during GWT bootstrap process?

Hi

I used GWT Lightweight Metrics in several of my projects. The progress looks real and gives some idea to a user how long he has to wait.

More info here:
http://www.gwtproject.org/doc/latest/DevGuideLightweightMetrics.html

Basically you have to put static script before nocache.js file that registers for metric events and from it updates the length of the progress bar.

Most of the time I just counted the amount of events required to show the actual app (I used a splash div with progress bar which hides the app until it's ready) including bootstrap and rpc events and used it as total amount for progress bar.

The drawback is, there are only 2 events fired when GWT loads scripts from gwt.xml. If you load big js libraries let me know so I can post a workaround for that :)

Greg

On Tuesday, October 27, 2015 at 7:26:33 PM UTC+1, Vassilis Virvilis wrote:
As I said check that the content you serve is compressed.

One other idea that pops to mind is the browser's developer's tools net tab to make sure that the problem is indeed in the loading of resources. Maybe you can identify a problematic resource? Or that the problem is not in the GWT script?

Otherwise I agree with Peter Donald post above for the most effective way to have a spinner/blocker element during load.

On Tue, Oct 27, 2015 at 8:16 PM, Ali Akhtar <ali.r...@gmail.com> wrote:

I use cssresource, etc. With all the images, etc combined, the size can be pretty high.

On Oct 27, 2015 11:15 PM, "Vassilis Virvilis" <vas...@gmail.com> wrote:
That's weird,,,

What is the size *.cache.js?

Make sure your webserver/tomcat serves compressed content.


On Tue, Oct 27, 2015 at 8:11 PM, Ali Akhtar <ali.r...@gmail.com> wrote:

It can take up to 10 seconds on slow connections. May be even more on mobile connections.

On Oct 27, 2015 11:07 PM, "Vassilis Virvilis" <vas...@gmail.com> wrote:
Just to make sure we are on the same page.

How much time does it take to load?

This looks serious overkill to me...

On Tue, Oct 27, 2015 at 6:43 PM, Ali Akhtar <ali.r...@gmail.com> wrote:

This is what I am doing currently. But its not the most user friendly.

I'd like to show a progress bar which indicates how much longer there is to go.

Worst case, I can override the Dom function for injecting a script, and use that to request the scripts over websockets, and update the progress with each frame sent.

Is that what I have to do, or is there a better way?

On Oct 27, 2015 3:51 PM, "Frank" <frank....@gmail.com> wrote:
Like Peter and Jens said, put a loading indicator in your host html page, and remove it in onModuleLoad.

For example. Put in your html :

<div id="splash">
   <div align="center">
      <img style="padding-top: 50px" src="img/ajax-loader-64.gif">
      <h3>Launching application<BR/>Please wait....</h3>
   </div>
</div>


And then in your onModuleLoad

RootPanel.getBodyElement().removeChild(DOM.getElementById("splash"));

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Cr8DuGnX1lk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Cr8DuGnX1lk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Cr8DuGnX1lk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment