The cause of the problem is definitively the IE rendering engine: http://javascript.weblogsinc.com/2005/03/07/javascript-memory-leaks/ http://www.posos.net/page/Index.cfm?SelNavID=2708 http://msdn2.microsoft.com/en-us/library/bb250448(VS.85).aspx
Now my question is, do you think it's worthed the effort of trying to modify Common1_0_X.js to prevent the leak problem? Maybe using a solution like this one: http://novemberborn.net/javascript/event-cache (this won't work for Trinidad out of the box but we could use the same approach). Davide On Thu, Mar 27, 2008 at 11:21 AM, Davide Bonicelli <[EMAIL PROTECTED]> wrote: > Hi Volker and Renzo, > the page I'm using to test memory usage is very simple and doesn't use > any custom javascript or PPR. > > Here is the code: > > /** LAYOUT **/ > > <! > DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > < > tr:document xmlns:ui="http://java.sun.com/jsf/facelets" > > xmlns:f="http://java.sun.com/jsf/core" > > xmlns:h="http://java.sun.com/jsf/html" > > xmlns:tr="http://myfaces.apache.org/trinidad" > > xmlns:trh="http://myfaces.apache.org/trinidad/html" > > title="Base test"> > > <f:view> > > <head> > > <meta http-equiv="Content-Type" > > content="text/html; charset=iso-8859-1" /> > > <title>RedMane Trinidad Test</title> > > <ui:insert name="beforeLoadScripts" /> > > </head> > > > > <tr:form > > defaultCommand="#{defaultFormCommand != null ? defaultFormCommand : > 'none'}" > > id="mainForm"> > > <div id="header"><!-- HEADER MENU --> <ui:insert > > name="headerMenu"> > > <ui:include src="headerMenu.xhtml" /> > > </ui:insert></div> > > <div id="content"> > > <div id="menuContent"> > > <div id="logo"> > > <h1><a href="#">Your Logo</a></h1> > > <h2><a href="http://www.redmane.com/">your link</a></h2> > > </div> > > <!-- LEFT SIDE MENU --> <ui:insert name="menu"> > > <ui:include src="menu.xhtml" /> > > </ui:insert></div> > > <div id="bodyContent"> > > <div id="welcome"><!-- PAGE TITLE --> > > <h2><ui:insert name="title">Default Page title</ui:insert></h2> > > <!-- ERROR MESSAGES --> <tr:messages /> <!-- PAGE CONTENT --> <ui:insert > > name="content"> > > <ui:include src="content.xhtml" /> > > </ui:insert></div> > > </div> > > </div> > > <div style="height:20px;"/> > > <!-- FOOTER --> > > <ui:insert name="footer"> > > <ui:include src="footer.xhtml" /> > > </ui:insert> > > </tr:form> > > </f:view> > > <ui:insert name="afterLoadScripts"/> > > </ > tr:document> /** THE PAGE **/ > <tr:subform > > xmlns:ui=http://java.sun.com/jsf/facelets > > xmlns:f="http://java.sun.com/jsf/core" > > xmlns:tr="http://myfaces.apache.org/trinidad"> > > <ui:composition template="/layout/layout.xhtml"> > > <ui:define name="title">Home Page</ui:define> > > <ui:define name="content"> > > Welcome > > <p> > > <tr:group rendered="#{securityContext.ifAllGranted['ROLE_TEST']}"> > > Testing ACEGI JSF > > </tr:group> > > </p> > > </ui:define> > > </ui:composition> > > </ > tr:subform> > > /** END OF CODE **/ > > By simply refreshing this page, the IE keeps allocating more memory. > > Since Firefox is behaving fine, I suppose it's an IE7 problem, so we > cannot do anything about it. I also made the same tests on > maps.google.com(that for what I know uses a lot of AJAX and Javascript) and > it presents the > same behavior! > > I'll maybe post something on an IE forum, but I don't expect a quick > solution to the problem (or any solution at all...) from Bill... > > Thanks again > > Davide > > On Thu, Mar 27, 2008 at 10:54 AM, Volker Weber <[EMAIL PROTECTED]> > wrote: > > > Hi Davide, > > > > did you use own javascript in your app? > > > > If you assign htmlNode objects to javascript object properties and/or > > vice versa the IE (at least IE6) did not correct free them on page > > unload. You need to remove this yourself by assigning undefined to > > those properties in the unload handler. > > > > We had a similar problem in tobago which we solved this way. > > > > > > Regards, > > Volker > > > > 2008/3/27, Davide Bonicelli <[EMAIL PROTECTED]>: > > > Hi Max, > > > thanks for your help. > > > > > > I ran sIEve and pointed it the homepage of my application. > > > It didn't detect any leak, but three cycle dependencies and an orphan. > > I > > > cannot post the output of the scan because it's humongous! > > > However, if I run "Auto-refresh" on my app for few seconds, I can see > > the > > > memory usage increasing linearly with increments between 380Kb and > > 1500Kb > > > per refresh. Meanwhile, the number of nodes used in the DOM never > > exceed 92. > > > > > > At this point I suppose Trnidad is not leaking any memory, but somehow > > IE is > > > not releasing memory while navigating through the pages of my app. I > > don't > > > see this behaviour in IE if I "Auto-refresh" other websites (ex. > > > google.com), where the memory used by IE is stable. > > > > > > I also have to correct my previous post: a deeper analysis shows me > > that > > > Firefox is deallocating the memory correctly while using my app (too > > bad my > > > client wants to use IE7). > > > > > > I don't know if this problem is worthed a deeper investigation. > > > > > > Thanks > > > Bye > > > Davide > > > > > > > > > > > > On Thu, Mar 27, 2008 at 9:53 AM, Max Starets <[EMAIL PROTECTED]> > > wrote: > > > > > > > Hi Davide, > > > > > > > > If Trinidad's Javascipt library leaks memory when user navigates > > from > > > > page to page, it is not normal > > > > or acceptable. There are tools, such as "drip" and "sIEve" that van > > help > > > > us diagnose the problem. > > > > > > > > Regards, > > > > Max Starets > > > > > > > > > > > > > > > > > > > > Davide Bonicelli wrote: > > > > > Hi everybody, > > > > > I'm developing an application based on Trinidad 1.0.7, > > > > > JSF-Facelets 1.1.14, Spring 2.5.2 and Hibernate 3.2.3ga running on > > > > > Tomcat 5.5. > > > > > I noticed that while navigating through the pages of the > > application, > > > > > the browser keep consuming more and more memory (both IE7 and > > Firefox > > > > > 2). Every time I visit a page (even one I already visited in the > > same > > > > > session), the memory used by the browser increases by about 1.5MB(I > > > > > monitored it with Sysinternal). > > > > > If I disable javascript in IE7 and load different pages of my > > > > > application, this behavior stops and the memory used by the > > browser is > > > > > stable, but logically the application doesn't work anymore. > > > > > > > > > > Is it normal that the browser consumes all this memory when using > > > > > Trinidad? Did anybody else experienced this problem? > > > > > I suppose the problem is connected with Common1_0_7.js. > > > > > My concern is that I had the browser eating up to 350MB of memory > > in a > > > > > session of less than an hour and I don't want to have problems > > related > > > > > with memory consumption when the application goes into production > > and > > > > > is used for 8 hours a day by a user. > > > > > > > > > > Thanks for your help > > > > > Bye > > > > > Davide > > > > > > > > > > > > > > > > > > > > > > > > > -- > > inexso - information exchange solutions GmbH > > Bismarckstraße 13 | 26122 Oldenburg > > Tel.: +49 441 4082 356 | > > FAX: +49 441 4082 355 | www.inexso.de > > > >

