Hi Frederic, I have done some analysis of qx memory use in a single page application, and compared IE6, IE7 and FF1.5.
Have a look for these threads in the mail list: "Memory creep" problem, Memory use test results for Qx 0.6.2 (r4314) on Win2k IE6, Memory use for IE6 vs IE7 vs FF1.5. I don't entirely agree with Sebastian's comment which implies that memory use will be dramatically better in IE7. That may be true for an app which reloads the page frequently, but it is not the case for a single page app. My testing shows that memory usage for single page apps in IE7 is marginally better than IE6, but still far worse than in FF1.5. Window.close() simply hides the window from view - it does not attempt to dispose it. I have not been able to successfully dispose a window (thou I haven't yet invested much effort). I am not certain, but I don't think that removeAll() attempts to dispose each object as well. I think it simply sets each instance's parent to null. Simon ----- Original Message ---- From: Sebastian Werner <[EMAIL PROTECTED]> To: qooxdoo Development <qooxdoo-devel@lists.sourceforge.net> Sent: Sunday, 19 November, 2006 6:04:57 AM Subject: Re: [qooxdoo-devel] When/How dispose object ? Hi Frederic! Could you please search the list archives for messages regarding disposing. I think there are already many answers for your question. Generally disposing does not mean to free up memory, you can optimize application using pooling of instances for examples. Another strategy is to use generated parts again e.g. confirm dialogs and pages from the tab view. There is no need to recreate identical dialogs each time a user open them etc. This behavior - regarding scalability should be, as mentioned in our blog, dramatically better in IE7. Have you ever tried it. I think it will have a market share by around 50 percent in 6 month. Hope this helps. Sebastian frederic schrieb: > Hello, > I am developping a mini CMS (to manage article/comments on a web site) using > Qooxdoo as frontend and PHP as backend. Under IE6, my app become quickly > heavy in memory and finally the more and more slow (due to the growth of > object in memory?). > I've developped my app without take care of memory usage and now it is > become the more and more urgent before enhance my CMS with new features. > > Regarding my last email, what is the best strategy to free memory ? > > In the Qooxdoo forum, I've more or less this sequence to free memory : > > obj.removeAll(); // remove all chid of a object > qx.ui.core.ClientDocument.getInstance().remove(obj); //remove a object from > the page (from the DOM?) > obj.dispose(); //dispose object (from Qooxdoo internal arrays?) > obj=null; // reinit the object > > Does all children object are freeing from memory with obj.removeAll() ? > Do you know if method (remove/removeAll/dispose) remove event listener on my > object ? > > Is it possible to have an automatic deletion of object on a specific event > for example "afterdisappear" event ? > What about a garbage collector to reorganize internal array to safe memory ? > > Thanks in advance for any help on this subject. > > frederic > > > frederic wrote: >> Hello, >> What is the best way to dispose object ? In the bottom of this post, I >> have added a sample. >> My sample code is very simple : >> - a button "OPEN WINDOW" is displayed in the main window. >> - when click on this button, a modal window is displayed with a close >> button. >> - when the close button is clicked, the modal window is closed and I try >> at this time to dispose the modal window to free memory. >> >> My code doesn't work. >> >> How/when dispose the modal window myWindow ? >> All children objects (btClose,myLabel) are disposed when modal window is >> disposed ? >> >> thanks for your help. >> >> frederic >> >> >> ------------------------------------------------------------------------------------- >> >> qx.OO.defineClass("custom.Application", qx.component.AbstractApplication, >> function () { qx.component.AbstractApplication.call(this);}); >> >> qx.Proto.main = function(){ >> var btOpen=new qx.ui.form.Button("OPEN WINDOW") >> btOpen.addToDocument(); >> btOpen.addEventListener("execute",this.Test,this); >> }; >> >> qx.Proto.Test = function(){ >> var myWindow=new qx.ui.window.Window(); >> myWindow.setCaption("TEST DISPOSE WINDOW"); >> myWindow.setBackgroundColor("#b7e54a"); >> myWindow.setSpace(100,200,100,200); >> myWindow.set({modal:true, showMaximize:false, showMinimize:false, >> showClose:true, resizeable:false, allowClose:true, allowMaximize:false, >> allowMinimize:false }); >> var myLabel=new qx.ui.basic.Label("a label...") >> myWindow.add(myLabel); >> var btClose=new qx.ui.form.Button("CLOSE WINDOW"); >> btClose.addEventListener("execute",function(){ >> myWindow.close(); >> }); >> myWindow.add(btClose); >> myWindow.addToDocument(); >> myWindow.open(); >> myWindow.addEventListener("appear",function(){ >> myWindow.debug("center..."); >> myWindow.centerToBrowser(); >> }); >> myWindow.addEventListener("disappear",function(){ >> myWindow.debug("dispose..."); >> myWindow.dispose(); >> }); >> }; >> >> >> > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel Send instant messages to your online friends http://au.messenger.yahoo.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel