29 Jan 2013 7:49 AM #1
Memory Management with Grid + Store + Proxy
I'm using ExtJS 4.0.7 on Windows 7 Professional with Chrome 24 and IE9.
Like several users in the Bugs 4.x forum, I've discoverd that every http request is adding to the browsers memory. Garbage collection does not free all the memory so over long periods of time (4-8 hours or more), or frequent polling (20 sec/min) the application begins to starve.
Yesterday I migrated to 4.1 beta from 4.0.7 hoping to resolve the problem but with no success.
Several others have already posted example code exposing the issue so I won't add to the collection. ShadowZero3000's post from May 2011 exemplifies the problem.
It appears that Tommy Maintz has provided a workaround for TOUCH-26 41 in the Touch 2.x Bugs forum.
My application is meant to run 7x24 without "constant" page refreshing, only AJAX updates and the deadline for delivery is not far away....
Is there a workaround for this show stopper?
Please let me know.
29 Jan 2013 10:48 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Do you have a locally runnable test case that I can test on the latest version of Ext JS 4?
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
29 Jan 2013 11:19 AM #3
29 Jan 2013 12:02 PM #4
I just want to update the thread...there is NO bug.
I stripped my application down to the core MVC XHR classes and ran numerous tests over the last couple of nights. I can happily report that there are no memory leaks resulting from the poling http store.load() method. The browser memory does increase after each load but eventually garbage collection frees up most if not all of the RAM.
In the end, my leaks are the result of dynamically adding ProgressBars to a Grid Column in its renderer.
I only want ProgressBars when there's something loading and loaded. Otherwise, the cell's text value will suffice...
If anyone knows how to destroy those orphaned objects between grid refreshes, please let me know!!
@EESW - I went through many of your posts, you're sharing some good stuff!
@EESW - I'm anxiously awaiting for you to share your fix....(please!)
I have a small example I can share with you if EESW's fix doesn't apply to my problem. I will follow up on this posting tomorrow morning EST.
Thank you both very much! If we can get this working I am going to purchase a license and introduce ExtJS to my employer, a very large well known world wide corporation.
Last edited by Cosma; 31 Jan 2013 at 7:33 AM. Reason: Update