Apparently cache is another attribute placed into djConfig array? if we take a look at latest 0.9.0 release of dojo-release-0.9.0/dojo/tests/back.html which contains sample djConfig
<script language="JavaScript" type="text/javascript"> // Dojo configuration djConfig = { //debugAtAllCosts: true, //Don't normally need this in applications. isDebug: true, dojoIframeHistoryUrl: "../../resources/iframe_history.html", //for xdomain preventBackButtonFix: false, cache:true //presumably we can set our cache param here but where is it referenced??? }; </script> FF maladies: This article suggests starting FF in safe mode as some FF extensions cause maladies with DOM parser http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book122 the article also suggests bypassing eval with dojo.writeIncludes() with DebugAtAllCosts=true where "Each of the required javascript filenames is added into a list of pending files that need to be loaded (the list is in order so that dependent files are loaded in the correct order). script tags are appended with src attributes set to the js files that need to be loaded. The script tags cause the files to be loaded by the browser: " as in this example.. dojo.require("dojo.myModule"); dojo.hostenv.writeIncludes(); // no eval will happen instead dependent files will loaded in 'correct order' Seems to suggest bypassing eval to accelerate loading.. Suggestions for JS Tools? M-- ----- Original Message ----- From: "James Holmes" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <user@struts.apache.org> Cc: "'Struts Developers List'" <[EMAIL PROTECTED]> Sent: Monday, September 24, 2007 9:50 PM Subject: RE: [s2] Struts head tag KILLS (> 10s) page load time > +1 > > -----Original Message----- > From: Don Brown [mailto:[EMAIL PROTECTED] > Sent: Monday, September 24, 2007 9:39 PM > To: Struts Users Mailing List > Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time > > Hmm...more info can be found here: http://dojo.jot.com/FAQ#Performance > > I wonder if we should require the cache=true flag when not in devmode, > or at least throw all sorts of warnings in the logs. We should do > everything possible to help the user avoid huge performance problems, > and I'd certainly classify this as one of them. > > Don > > On 9/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: > > It is a dojo/browser thing. All we can do is done already, if you set > > cache="true" Struts 2 will use a custom build where only one file > > (which will be cached) will be used. > > > > musachy > > > > On 9/24/07, Don Brown <[EMAIL PROTECTED]> wrote: > > > Oh damn, why is that? Cache is critical here. > > > > > > Don > > > > > > On 9/24/07, Musachy Barroso <[EMAIL PROTECTED]> wrote: > > > > When a file is loaded using dojo.require, it is not cached by the > browser. > > > > > > > > musachy > > > > > > > > On 9/23/07, Jason Wyatt <[EMAIL PROTECTED]> wrote: > > > > > Hi Martin, > > > > > > > > > > Yes, that's right. > > > > > > > > > > The dojo "requires" seemed unexpectedly slow during our tests. I was > using > > > > > Firefox's Firebug to check page load times. From memory, it looked > like the > > > > > dojo includes were being requested sequentially and seemed to give > > > > > substantial page loading overhead (>2s) even if the dojo .js files > were > > > > > cached. > > > > > > > > > > I never fully understood why there was a large overhead although the > dojo > > > > > files were supposedly cached. It might have been a quirk with > firebug and > > > > > dojo "requires", or maybe the "requires" routine itself is slow, > when called > > > > > 30+ times. > > > > > > > > > > About 5 dojo files were consistently returning "not found" as well, > which > > > > > may not have helped the load times. > > > > > > > > > > Removing as much dojo stuff as I could, and upgrading from Struts > 2.0.8 to > > > > > 2.0.9 has solved our page load time issues. > > > > > > > > > > Regards > > > > > Jason > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Martin Gainty [mailto:[EMAIL PROTECTED] > > > > > Sent: Friday, 21 September 2007 11:41 AM > > > > > To: Struts Users Mailing List > > > > > Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time > > > > > > > > > > Hi Jason- > > > > > > > > > > so by attentuating dojo includes you decreased initial load time for > dojo > > > > > with the beneficial side effect of faster response to the browser? > > > > > > > > > > Thanks/ > > > > > Martin-- > > > > > ----- Original Message ----- > > > > > From: "Jason Wyatt" <[EMAIL PROTECTED]> > > > > > To: "'Struts Users Mailing List'" <user@struts.apache.org> > > > > > Sent: Thursday, September 20, 2007 9:09 PM > > > > > Subject: RE: [s2] Struts head tag KILLS (> 10s) page load time > > > > > > > > > > > > > > > >I had the same issue... We use the ajax tabbed panel but no other > dojo > > > > > > widgets, but the <s:head theme="ajax"> tag had dojo "requiring" > all of the > > > > > > dojo widget library. > > > > > > > > > > > > This was causing our page to fire off 70+ requests when loading. > As our > > > > > > app > > > > > > needs to be accessed up to a thousand km away, tests showed > initial load > > > > > > times of over 10s because of latency. > > > > > > > > > > > > I modified web\template\ajax\head.ftl to include a custom > > > > > > web\hack\ajax\dojoRequire.js that had the minimum dojo includes > for the > > > > > > tabbed panels. This managed to get the number of requests down to > around > > > > > > 30, > > > > > > mostly our own images and scripts, which gave acceptable load > times. > > > > > > > > > > > > Eg. > > > > > > > > > > > > web\template\ajax\head.ftl: > > > > > > > > > > > > <#include > "/${parameters.templateDir}/${themeProperties.parent}/head.ftl" > > > > > > /> > > > > > > <script type="text/javascript" > > > > > > src="<@s.url value='/hack/ajax/dojoRequire.js' > includeParams='none' > > > > > > encode='false' />"></script> > > > > > > <script type="text/javascript" > > > > > > src="<@s.url value='/struts/CommonFunctions.js' > > > > > > includeParams='none' > > > > > > encode='false'/>"></script> > > > > > > > > > > > > > > > > > > web\hack\ajax\dojoRequire.js: > > > > > > > > > > > > dojo.require("dojo.io.BrowserIO"); > > > > > > dojo.require("dojo.event.topic"); > > > > > > > > > > > > dojo.hostenv.setModulePrefix('struts', 'struts'); > > > > > > //dojo.require('dojo.widget.*'); > > > > > > dojo.widget.manager.registerWidgetPackage('struts.widget'); > > > > > > > > > > > > dojo.require("struts.widget.Bind"); > > > > > > dojo.require("struts.widget.BindDiv"); > > > > > > //dojo.require("struts.widget.BindAnchor"); > > > > > > //dojo.require("struts.widget.ComboBox"); > > > > > > //dojo.require("struts.widget.StrutsTimePicker") > > > > > > //dojo.require("dojo.widget.Editor2"); > > > > > > //dojo.hostenv.writeIncludes(); // not needed, but allows the > Venkman > > > > > > debugger to work with the includes > > > > > > > > > > > > > > > > > > Hope this helps, regards > > > > > > Jason > > > > > > > > > > > > ----- > > > > > > Falun Dafa Truth - Compassion - Forbearance > > > > > > > > > > > > A mind & body practice under persecution in China > > > > > > > > > > > > http://www.faluninfo.net > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > > > > > > Sent: Friday, 21 September 2007 8:09 AM > > > > > > To: Struts Users Mailing List > > > > > > Subject: Re: [s2] Struts head tag KILLS (> 10s) page load time > > > > > > > > > > > > If Dojo is being used for AJAX in this case, that's my guess. I > know from > > > > > > experience that Dojo, can issue a TON of requests even if you > think your > > > > > > only loading a small portion of it. Assuming this guess is > correct, > > > > > > Musachy, does S2 use a custom build of Dojo? If not, that might > be worth > > > > > > considering. > > > > > > > > > > > > Frank > > > > > > > > > > > > -- > > > > > > Frank W. Zammetti > > > > > > Founder and Chief Software Architect > > > > > > Omnytex Technologies > > > > > > http://www.omnytex.com > > > > > > AIM/Yahoo: fzammetti > > > > > > MSN: [EMAIL PROTECTED] > > > > > > Author of "Practical Ajax Projects With Java Technology" > > > > > > (2006, Apress, ISBN 1-59059-695-1) > > > > > > and "JavaScript, DOM Scripting and Ajax Projects" > > > > > > (2007, Apress, ISBN 1-59059-816-4) > > > > > > Java Web Parts - http://javawebparts.sourceforge.net > > > > > > Supplying the wheel, so you don't have to reinvent it! > > > > > > > > > > > > chengas123 wrote: > > > > > >> Hi, > > > > > >> I am working on a Struts 2 page and page load times are way too > high. > > > > > >> I tracked it down to the Struts head tag, which I have as > follows: > > > > > >> <s:head theme="ajax" /> Without the tag, my page issues 3 > requests and > > > > > >> takes 453ms to load. With the tag, the page issues 54 requests > taking > > > > > >> 12.24s to load. > > > > > >> Is there something I am doing wrong here? > > > > > >> > > > > > >> Thanks, > > > > > >> Ben > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > -- > > > > "Hey you! Would you help me to carry the stone?" Pink Floyd > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > -- > > "Hey you! Would you help me to carry the stone?" Pink Floyd > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]