 <?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Lazy Loading</title>
	<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html</link>
	<description>All Things Zimbra</description>
	<pubDate>Tue, 06 Jan 2009 10:26:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: And The Winner of the Browser Wars is&#8230;. &#187; Zimbra :: Blog</title>
		<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-8775</link>
		<dc:creator>And The Winner of the Browser Wars is&#8230;. &#187; Zimbra :: Blog</dc:creator>
		<pubDate>Tue, 17 Jun 2008 22:41:56 +0000</pubDate>
		<guid>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-8775</guid>
		<description>[...] user experience faster with the Zimbra Web Client. We’ve talked about Jetty, YUI compression, and Lazy Loading, but now there’s just one burning question: Which browser is fastest?  There&#8217;s some amazing [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] user experience faster with the Zimbra Web Client. We’ve talked about Jetty, YUI compression, and Lazy Loading, but now there’s just one burning question: Which browser is fastest?  There&#8217;s some amazing [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conrad</title>
		<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-313</link>
		<dc:creator>Conrad</dc:creator>
		<pubDate>Wed, 04 Apr 2007 09:18:20 +0000</pubDate>
		<guid>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-313</guid>
		<description>Actually, that's exactly what we do. Almost all our SOAP requests to the server are sent asynchronously (check the code for calls to the function sendRequest(), and you'll see the parameter 'asyncMode' is set to true). That happens through a set of classes which wrap XHR and provide support for a reusable pool of request objects, fault handling, timeouts, etc.

For loading code we use a very thin wrapper around XHR and issue requests synchronously.
</description>
		<content:encoded><![CDATA[<p>Actually, that&#8217;s exactly what we do. Almost all our SOAP requests to the server are sent asynchronously (check the code for calls to the function sendRequest(), and you&#8217;ll see the parameter &#8216;asyncMode&#8217; is set to true). That happens through a set of classes which wrap XHR and provide support for a reusable pool of request objects, fault handling, timeouts, etc.</p>
<p>For loading code we use a very thin wrapper around XHR and issue requests synchronously.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zuhair Naqvi</title>
		<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-312</link>
		<dc:creator>Zuhair Naqvi</dc:creator>
		<pubDate>Wed, 04 Apr 2007 00:22:32 +0000</pubDate>
		<guid>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-312</guid>
		<description>That sounds refreshing wish you all the best with the code clean up. However, the application is not lazy only at the start up it is slow in over all working, like when I click on something, it halts the entire script for a few seconds. My analysis tells me that the real reason for laziness
is not the way code is loaded but the way data is:

Generally in XHR mechanism you have two options in the send command you can either keep the communication asynchronous or you may keep it synchronous. I suggest that you load the code synchronously but load the data asynchronously this will save a lot of script memory and keep data loading separate from code loading in a running script
</description>
		<content:encoded><![CDATA[<p>That sounds refreshing wish you all the best with the code clean up. However, the application is not lazy only at the start up it is slow in over all working, like when I click on something, it halts the entire script for a few seconds. My analysis tells me that the real reason for laziness<br />
is not the way code is loaded but the way data is:</p>
<p>Generally in XHR mechanism you have two options in the send command you can either keep the communication asynchronous or you may keep it synchronous. I suggest that you load the code synchronously but load the data asynchronously this will save a lot of script memory and keep data loading separate from code loading in a running script</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Burke</title>
		<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-311</link>
		<dc:creator>James Burke</dc:creator>
		<pubDate>Mon, 02 Apr 2007 22:03:53 +0000</pubDate>
		<guid>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-311</guid>
		<description>Expanding on Brad Neuberg's comment:
Dojo does use script tags for cross-domain (xdomain) loading. A custom build of the modules are done to wrap the module code in a function so that the module code does not execute immediately on load. Then, Dojo's resource loader orders the module dependencies correctly, then calls the functions to define the modules. This is how we are able to host all of Dojo's modules on a CDN to allow anyone to use them without having to download Dojo to their server.

The Dojo build system also supports "layered" builds now too, where you can bundle up a set of modules into one file, for faster load time.

Debugging with using an XHR-based loader:
If you have an "onload" registration mechanism (Dojo has dojo.addOnLoad()), and a dojo.provide()-like method call to inform you when a module loads, then you can use XHR to map the module dependencies, then use script tags to attach one script at a time. When you get your "module loaded" call (in Dojo, it is dojo.provide() is used), set a timeout to load the next module in the dependency graph. A timeout is used to make sure the whole script file has been evaluated before adding the next script tag, since the dojo.provide() calls are normally at the top of the files. That is the approach Dojo's xd loader takes when trying to debug local/same domain modules (which are loaded via XHR).

The caveat with that sort of debugging model: you cannot rely on the modules loading synchronously, so you need your code in your top-level page to wait to be called back when all the modules are loaded. dojo.addOnLoad() is used in the Dojo case.

</description>
		<content:encoded><![CDATA[<p>Expanding on Brad Neuberg&#8217;s comment:<br />
Dojo does use script tags for cross-domain (xdomain) loading. A custom build of the modules are done to wrap the module code in a function so that the module code does not execute immediately on load. Then, Dojo&#8217;s resource loader orders the module dependencies correctly, then calls the functions to define the modules. This is how we are able to host all of Dojo&#8217;s modules on a CDN to allow anyone to use them without having to download Dojo to their server.</p>
<p>The Dojo build system also supports &#8220;layered&#8221; builds now too, where you can bundle up a set of modules into one file, for faster load time.</p>
<p>Debugging with using an XHR-based loader:<br />
If you have an &#8220;onload&#8221; registration mechanism (Dojo has dojo.addOnLoad()), and a dojo.provide()-like method call to inform you when a module loads, then you can use XHR to map the module dependencies, then use script tags to attach one script at a time. When you get your &#8220;module loaded&#8221; call (in Dojo, it is dojo.provide() is used), set a timeout to load the next module in the dependency graph. A timeout is used to make sure the whole script file has been evaluated before adding the next script tag, since the dojo.provide() calls are normally at the top of the files. That is the approach Dojo&#8217;s xd loader takes when trying to debug local/same domain modules (which are loaded via XHR).</p>
<p>The caveat with that sort of debugging model: you cannot rely on the modules loading synchronously, so you need your code in your top-level page to wait to be called back when all the modules are loaded. dojo.addOnLoad() is used in the Dojo case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Neuberg</title>
		<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-310</link>
		<dc:creator>Brad Neuberg</dc:creator>
		<pubDate>Wed, 28 Mar 2007 17:46:53 +0000</pubDate>
		<guid>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-310</guid>
		<description>No prob not adopting Dojo's package system, but Dojo supports the idea of a package being a collection of files as well as a single file. For exmaple, you could say:

dojo.require("dojo.off.*");

which will get all of the files comprising the Dojo Offline system. Or you could do:

dojo.require("dojo.sync");

which would just get the sync.js file (neither of these are available yet, btw, until Dojo Offline is finished in a few weeks).

Dojo does do XHR, but that is because you have no control over the order of how SCRIPT tags load -- what happens if you have 5 packages across 5 different script tags, with dependencies, and they load out of order? With XHR, Dojo can enforce that they are loaded in the correct order.

Best,
Brad Neuberg
</description>
		<content:encoded><![CDATA[<p>No prob not adopting Dojo&#8217;s package system, but Dojo supports the idea of a package being a collection of files as well as a single file. For exmaple, you could say:</p>
<p>dojo.require(&#8221;dojo.off.*&#8221;);</p>
<p>which will get all of the files comprising the Dojo Offline system. Or you could do:</p>
<p>dojo.require(&#8221;dojo.sync&#8221;);</p>
<p>which would just get the sync.js file (neither of these are available yet, btw, until Dojo Offline is finished in a few weeks).</p>
<p>Dojo does do XHR, but that is because you have no control over the order of how SCRIPT tags load &#8212; what happens if you have 5 packages across 5 different script tags, with dependencies, and they load out of order? With XHR, Dojo can enforce that they are loaded in the correct order.</p>
<p>Best,<br />
Brad Neuberg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conrad</title>
		<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-309</link>
		<dc:creator>Conrad</dc:creator>
		<pubDate>Tue, 27 Mar 2007 17:12:08 +0000</pubDate>
		<guid>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-309</guid>
		<description>Sorry, they didn't make it into 4.5. They're slated for 5.0, which is scheduled for Q3/Q4 (it's our next major release). Of course, they're available in the open source download if you want to check them out.
</description>
		<content:encoded><![CDATA[<p>Sorry, they didn&#8217;t make it into 4.5. They&#8217;re slated for 5.0, which is scheduled for Q3/Q4 (it&#8217;s our next major release). Of course, they&#8217;re available in the open source download if you want to check them out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bart</title>
		<link>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-308</link>
		<dc:creator>Bart</dc:creator>
		<pubDate>Tue, 27 Mar 2007 11:29:49 +0000</pubDate>
		<guid>http://www.zimbrablog.com/blog/archives/2007/03/lazy-loading.html#comment-308</guid>
		<description>Sounds great! :) In what version will these changes be made available? Or are they already in 4.5?

Thanks a lot!
</description>
		<content:encoded><![CDATA[<p>Sounds great! <img src='http://www.zimbrablog.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> In what version will these changes be made available? Or are they already in 4.5?</p>
<p>Thanks a lot!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.606 seconds -->
