[Seaside] Re: Non-blocking jQuery load
jtuchel at objektfabrik.de
Fri Nov 20 07:08:04 UTC 2015
Am 19.11.15 um 22:17 schrieb Johan Brichau-2 [via Smalltalk]:
> Hi Joachim,
> jQuery load is an ajax request and should thus not be blocking any
> browser action.
Yes, that's what I thought as well...
> What kind of interaction are you expecting from the ‘click’ to which
> the browser is not responder?
> program, ... ?
On our Dashboard we have the main navigation menu which consists of
anchors with normal callback blocks.
After I had sent my last mail, I saw that both ajax requests take about
the same time to finish (4022 and 4096 ms on a slow development
machine), so I thought maybe this all is just a coincidence.
So here is what I've tried then:
I added a (Delay forSeconds: 5) wait to one of our dashboard widget's
What happens is this:
The widgets all immediately start an ajax request, and the one without
the Delay gets rendered after the usual 4 seconds. The other one renders
a bit more than 5 seconds later. So far, so unsurprising.
BUT: If I click on one of the main navigation links (which should be
totally unrelated to the Components that issue the ajax call), the
callback is not called before the longer runnin Ajax request is
finished. The Re-rendering of the Component in the Browser is not
performed, however (at least I can't see it).
So the first observation seems to tell me the "load html:" calls are not
blocking. The second, however, seems to indicate that they block.
Or (shiver) there is something strange going on on the server side (VA
Smalltalk) that keeps the server from handling the "normal" request
before the ajax requests are finished. I need to test with a bit more
logging to find out...
Thanks for listening,
> > On 19 Nov 2015, at 09:59, jtuchel <[hidden email]
> </user/SendEmail.jtp?type=node&node=4862097&i=0>> wrote:
> > Hi,
> > in our application, the user sees a dashboard right after logging in.
> > Depending on the configuration of this dashboard, load and render
> times can
> > get quite long.
> > So we tried to wrap slow components into a Decoration that uses
> load() to
> > postponbe the loading of their content. The render code in our
> > looks like this:
> > replaced
> > ifTrue: [div with: [self renderNextOn: html]]
> > ifFalse: [
> > html document addLoadScript: (
> > (html jQuery: self idSelector) load html: [:r |
> > replaced := true.
> > self renderNextOn: html]).
> > div with: [
> > html image src: someSpinnerImage
> > html space; text: self message]]
> > Thus, we hoped, the page would display very quickly, and be responsive
> > before all the widgets are loaded.
> > So far, we've reached one of the two goals: the page now loads
> quickly and
> > the widgets use ajax to load their contents later. Another nice side
> > is that if you go back to the start page, all widgets are loaded
> > The other goal, however, is not met: If you log in and immediately
> click on
> > one of the menu items, the browser won't react to your click before all
> > widgets have finished loading. So it seems like jQuery's load is
> > We've tried in Chrome and Firefox, and both expose this behavior.
> > Does anybody know how to not only cheat on the load times of our
> > but also enable the browser to react on clicks before all widgets have
> > loaded their contents?
> > Any hint is appreciated,
> > Joachim
> > --
> > View this message in context:
> > Sent from the Seaside General mailing list archive at Nabble.com.
> > _______________________________________________
> > seaside mailing list
> > [hidden email] </user/SendEmail.jtp?type=node&node=4862097&i=1>
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> seaside mailing list
> [hidden email] </user/SendEmail.jtp?type=node&node=4862097&i=2>
> If you reply to this email, your message will be added to the
> discussion below:
> To unsubscribe from Non-blocking jQuery load, click here
Objektfabrik Joachim Tuchel mailto:jtuchel at objektfabrik.de
Fliederweg 1 http://www.objektfabrik.de
D-71640 Ludwigsburg http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1
View this message in context: http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862141.html
Sent from the Seaside General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside