Hi Martin,
my ping alone is 170ms, so I won't explore this argument further. Also I
think the comparison between loading a map and the map API is not
correct - I am comparing the time needed to show my application with and
without the maps API (always taking the naive, blocking approach) and at
least for recurring visitors, the difference in user experience is notable.
Are you sure 3 and 4 are loaded simultaneously with the AjaxLoader? As
far as my understanding of the bootstrap process goes, 4 is launched by
the application itself, which cannot be sooner than 3 is loaded.
Martin Delemotte wrote:
> I forgot to mention, the loading order is:
>
> 1. load host page
> 2. load .nocache.js
> 4. load google maps API
> 3. load .cache.js
>
> with 3 and 4 in parallel
>
>
>
> On Sun, Sep 20, 2009 at 1:21 PM, Martin Delemotte
> <
martin.d...@gmail.com <mailto:
martin.d...@gmail.com>> wrote:
>
> Yes, you are right indeed.
>
> This is a tradeoff between clean code and performance penalty.
> From where I test it is 184ms which is quite negligible compared
> to the time it takes to load maps...
>
>
>
>
> On Sun, Sep 20, 2009 at 3:06 AM, George Georgovassilis
> <
g.georgo...@gmail.com <mailto:
g.georgo...@gmail.com>>
> wrote:
>
>
> Hello Martin,
>
> Look lot cleaner than my solution - however I see a certain
> performance penalty with that. The bootstrap process with your
> example
> is:
>
> 1. load host page
> 2. load .nocache.js
> 3. load .cache.js
> 4. load google maps API
>
> and it's all serialized.
>
> With the direct injection of the code into the html the bootstrap
> process is shortened, because GWT's module and the Maps API
> load in
> parallel:
>
> 1. load host page
> 2. load .nocache.js and google maps API in parallel
> 3. load .cache.js
>
> what do you think?
>
>
> On Sep 19, 4:56 pm, Martin Delemotte
> <
martin.delemo...@gmail.com <mailto:
martin.delemo...@gmail.com>>
> wrote:
> > Have a look at AjaxLoader:
> >
> > AjaxLoader.init("your maps key here");
> > AjaxLoader.loadApi("maps", "2", new Runnable() {
> > public void run() {
> > //action to perform after api is loaded
> > }
> > }, null);
> >
> > On Sat, Sep 19, 2009 at 9:42 AM, George Georgovassilis <
> >
> >
g.georgovassi...@gmail.com
> <mailto:
g.georgovassi...@gmail.com>> wrote:
> >
> > > Sorry to hijack this thread, but since we're talking about
> this...
> > > what's the best way of loading the maps API
> javascriptlibrary without
> > > blocking (aka unblocking parallel downloads)?
> >
> > > So far I ended up with this:
> >
> > > <script type="text/javascript">
> > > //<![CDATA[
> > > function loadGoogleMapsAPI(){
> > > var script = document.createElement("script");
> > > script.type = "text/javascript";
> > > script.src = "
http://maps.google.com/maps?
> > > file=api&v=2&async=2&sensor=false&key=XYZ";
> > > document.body.appendChild(script);
> > > }
> > > window.setTimeout("loadGoogleMapsAPI()",1);
> > > //]]>
> >
> > > On Sep 19, 4:33 am, martind <
martin.delemo...@gmail.com
> <mailto:
martin.delemo...@gmail.com>> wrote:
> > > > I formatted my disk and reinstalled Fedora 11 yesterday.
> I do not
> > > > encounter the problem anymore.
> > > > I guess I will never know what was wrong ;)
> >
> > > > On Sep 13, 11:34 am, martind <
martin.delemo...@gmail.com
> <mailto:
martin.delemo...@gmail.com>> wrote:
> >
> > > > > If I compile my application and run it in my system
> browser, it works
> > > > > fine. Firebug raises no issues.
> >
> > > > > However, it fails in hosted mode...
> >
> > > > > On Sep 12, 5:57 pm, Eric Ayers <
zun...@google.com
> <mailto:
zun...@google.com>> wrote:
> >
> > > > > > I've not heard of problems using the Maps API with
> GWT 1.7. Can you
> > > > > > use firebug or some other way to trace your network
> messages and see
> > > > > > that indeed the script tag you've got in your module
> specification is
> > > > > > working?
> >
> > > > > > On Sat, Sep 12, 2009 at 5:48 PM,
> martind<
martin.delemo...@gmail.com
> <mailto:
martin.delemo...@gmail.com>>
> <mailto:
zun...@google.com>> wrote:
> > > > > > >> 1) Have you tried running it with a Maps key
> installed as the
> > > error
> > > > > > >> message suggests?
> >
> > > > > > >> 2) Are you on Windows? If so, have your IE
> cache/proxy/security
> > > > > > >> settings changed recently? That sometimes gets
> in the way of the
> > > > > > >> Google APIs requests.
> >
> > > > > > >> On Mon, Sep 7, 2009 at 6:50 PM, martind<
> > >
martin.delemo...@gmail.com