tjstuart
06-25-2008, 02:55 AM
Hello All,
I've had a few requests for this and as I cannot attach files to Private Messages (maybe I'm blind??), I've created a thread here. Mods, remove this post if you feel this is inappropriate, incorrect, violates the license or whatever.
Attached is a patched version of ext-all-debug.js which fixes many of the leaks that exist with this library. Thanks to Jack Slocum for providing the original fixes which we ported to Ext 1.1.1.
We also had to add some extra custom fixes to TreeNode and TreeNodeUI which leaked massively (at least in the way we were using them).
This patched version is critical for anybody developing long-running dynamic widget-heavy applications. Without this patch (in a totally dynamic application where the user is expected to use the application for 5 hours plus) the browser would consume anywhere between 200-800MB (depending on usage). With the patch, the browser memory consumption tends to peak at around 100MB.
In your own code ie. application, custom widgets etc, you have to ensure you call 'removeAllListeners()' on rogue/orphan elements whom had event listeners attached eg. grid views' "scroller", "mainBody" etc.
Check the source for 'START MEMPATCH' and 'END MEMPATCH' comments.
PS. To use this patch in production you should obviously use JSBuilder to create the minified ext-all,js from the attached.
Regards,
tjstuart
I've had a few requests for this and as I cannot attach files to Private Messages (maybe I'm blind??), I've created a thread here. Mods, remove this post if you feel this is inappropriate, incorrect, violates the license or whatever.
Attached is a patched version of ext-all-debug.js which fixes many of the leaks that exist with this library. Thanks to Jack Slocum for providing the original fixes which we ported to Ext 1.1.1.
We also had to add some extra custom fixes to TreeNode and TreeNodeUI which leaked massively (at least in the way we were using them).
This patched version is critical for anybody developing long-running dynamic widget-heavy applications. Without this patch (in a totally dynamic application where the user is expected to use the application for 5 hours plus) the browser would consume anywhere between 200-800MB (depending on usage). With the patch, the browser memory consumption tends to peak at around 100MB.
In your own code ie. application, custom widgets etc, you have to ensure you call 'removeAllListeners()' on rogue/orphan elements whom had event listeners attached eg. grid views' "scroller", "mainBody" etc.
Check the source for 'START MEMPATCH' and 'END MEMPATCH' comments.
PS. To use this patch in production you should obviously use JSBuilder to create the minified ext-all,js from the attached.
Regards,
tjstuart