<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  
  
    <div class="moz-cite-prefix">Hi Johan,<br>
      <br>
      <br>
      Am 19.11.15 um 22:17 schrieb Johan Brichau-2 [via Smalltalk]:<br>
    </div>
    <blockquote style='border-left:2px solid #CCCCCC;padding:0 1em'
      cite="mid:127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be"
      type="cite"> Hi Joachim,
      <br>
      <br>
      jQuery load is an ajax request and should thus not be blocking any
      browser action.
      <br>
    </blockquote>
    <br>
    Yes, that's what I thought as well...<br>
    <br>
    <blockquote style='border-left:2px solid #CCCCCC;padding:0 1em'
      cite="mid:127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be"
      type="cite"><br>
      What kind of interaction are you expecting from the ‘click’ to
      which the browser is not responder? <br>
      A page request, an ajax request, the execution of a javascript
      program, ... ?
      <br>
    </blockquote>
    On our Dashboard we have the main navigation menu which consists of
    anchors with normal callback blocks.<br>
    <br>
    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.<br>
    <br>
    So here is what I've tried then:<br>
    <br>
    I added a (Delay forSeconds: 5) wait to one of our dashboard
    widget's business code.<br>
    <br>
    What happens is this:<br>
    <br>
    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.<br>
    <br>
    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).<br>
    <br>
    So the first observation seems to tell me the "load html:" calls are
    not blocking. The second, however, seems to indicate that they
    block.<br>
    <br>
    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...<br>
    <br>
    Thanks for listening,<br>
    <br>
    Joachim<br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <blockquote style='border-left:2px solid #CCCCCC;padding:0 1em'
      cite="mid:127AA433-559A-478E-9E77-CCCAE71DEEB1@inceptive.be"
      type="cite"><br>
      Johan
      <br>
      <div class="shrinkable-quote"><br>
        &gt; On 19 Nov 2015, at 09:59, jtuchel &lt;<a
          moz-do-not-send="true"
          href="/user/SendEmail.jtp?type=node&amp;node=4862097&amp;i=0"
          target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;
        wrote:
        <br>
        &gt; <br>
        &gt; Hi,
        <br>
        &gt; <br>
        &gt; in our application, the user sees a dashboard right after
        logging in.
        <br>
        &gt; Depending on the configuration of this dashboard, load and
        render times can
        <br>
        &gt; get quite long.
        <br>
        &gt; <br>
        &gt; So we tried to wrap slow components into a Decoration that
        uses load() to
        <br>
        &gt; postponbe the loading of their content. The render code in
        our decoration
        <br>
        &gt; looks like this: <br>
        &gt; <br>
        &gt; replaced
        <br>
        &gt; ifTrue: [div with: [self renderNextOn: html]]
        <br>
        &gt; ifFalse: [
        <br>
        &gt; html document addLoadScript: (
        <br>
        &gt; (html jQuery: self idSelector) load html: [:r |
        <br>
        &gt; replaced := true.
        <br>
        &gt; self renderNextOn: html]).
        <br>
        &gt; div with: [
        <br>
        &gt; html image src: someSpinnerImage
        <br>
        &gt; html space; text: self message]]
        <br>
        &gt; <br>
        &gt; <br>
        &gt; <br>
        &gt; Thus, we hoped, the page would display very quickly, and be
        responsive
        <br>
        &gt; before all the widgets are loaded.
        <br>
        &gt; <br>
        &gt; So far, we've reached one of the two goals: the page now
        loads quickly and
        <br>
        &gt; the widgets use ajax to load their contents later. Another
        nice side effect
        <br>
        &gt; is that if you go back to the start page, all widgets are
        loaded already.
        <br>
        &gt; <br>
        &gt; The other goal, however, is not met: If you log in and
        immediately click on
        <br>
        &gt; one of the menu items, the browser won't react to your
        click before all
        <br>
        &gt; widgets have finished loading. So it seems like jQuery's
        load is blocking.
        <br>
        &gt; <br>
        &gt; We've tried in Chrome and Firefox, and both expose this
        behavior. <br>
        &gt; Does anybody know how to not only cheat on the load times
        of our dashboard
        <br>
        &gt; but also enable the browser to react on clicks before all
        widgets have
        <br>
        &gt; loaded their contents?
        <br>
        &gt; <br>
        &gt; Any hint is appreciated,
        <br>
        &gt; <br>
        &gt; Joachim
        <br>
        &gt; <br>
        &gt; <br>
        &gt; <br>
        &gt; --
        <br>
        &gt; View this message in context: <a moz-do-not-send="true"
          href="http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html"
          target="_top" rel="nofollow" link="external">http://forum.world.st/Non-blocking-jQuery-load-tp4861881.html</a><br>
        &gt; Sent from the Seaside General mailing list archive at
        Nabble.com.
        <br>
        &gt; _______________________________________________
        <br>
        &gt; seaside mailing list
        <br>
        &gt; <a moz-do-not-send="true"
          href="/user/SendEmail.jtp?type=node&amp;node=4862097&amp;i=1"
          target="_top" rel="nofollow" link="external">[hidden email]</a>
        <br>
        &gt; <a moz-do-not-send="true"
href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside"
          target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a></div>
      <br>
      _______________________________________________
      <br>
      seaside mailing list
      <br>
      <a moz-do-not-send="true"
        href="/user/SendEmail.jtp?type=node&amp;node=4862097&amp;i=2"
        target="_top" rel="nofollow" link="external">[hidden email]</a>
      <br>
      <a moz-do-not-send="true"
href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside"
        target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
      <br>
      <br>
      <hr color="#cccccc" size="1" noshade="noshade">
      <div style="color:#444; font: 12px
        tahoma,geneva,helvetica,arial,sans-serif;">
        <div style="font-weight:bold">If you reply to this email, your
          message will be added to the discussion below:</div>
        <a moz-do-not-send="true"
href="http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862097.html" target="_top" rel="nofollow" link="external">http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862097.html</a>
      </div>
      <div style="color:#666; font: 11px
tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
        To unsubscribe from Non-blocking jQuery load, <a
          moz-do-not-send="true"
href="" target="_top" rel="nofollow" link="external">click
          here</a>.<br>
        <a moz-do-not-send="true"
href="http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_top" link="external">NAML</a> </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          <a href="/user/SendEmail.jtp?type=node&node=4862141&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>
Fliederweg 1                         <a class="moz-txt-link-freetext" href="http://www.objektfabrik.de" target="_top" rel="nofollow" link="external">http://www.objektfabrik.de</a>
D-71640 Ludwigsburg                  <a class="moz-txt-link-freetext" href="http://joachimtuchel.wordpress.com" target="_top" rel="nofollow" link="external">http://joachimtuchel.wordpress.com</a>
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

</pre>
  



        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/Non-blocking-jQuery-load-tp4861881p4862141.html">Re: Non-blocking jQuery load</a><br/>
Sent from the <a href="http://forum.world.st/Seaside-General-f86180.html">Seaside General mailing list archive</a> at Nabble.com.<br/>