- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
GWT Conference: Creating Widgets (or really, why GWT won’t leak memory)
This talk by Joel Webber was perhaps the most interesting of the conference so far. It wasn't really about creating widgets, but more about some of the internals of GWT and how it is realized in DOM/JavaScript. For example, why is there this big, ugly DOM class? Apparently in the early days of GWT (before it was know as GWT) all of the DOM object were wrapped in another JavaScript object. So you could write things like element.setStyleName("Woot");. But it ran like a dog. With GWT 1.5, however, the compiler has improved so it can inline calls to DOM, so now Element can have methods that delegate to DOM and the compiler will make sure it runs fast.
Another point was that GWT makes sure that dynamically added DOM nodes don't leak, and unlike most other libraries, they don't do so by cleaning up stuff on unload. I'll see if I can get some sort of version of Joel's talk, because it speaks to some of how GWT is a parsimonious (stingy with memory and other resources).
Some Joel quotes:
"Why on earth do I have this huge, ugly mega static Class called DOM? That's a fair question."
"Memory leaks in JavaScript are very very subtle. Most JavaScript libraries don't try to solve this problem. GWT does."
"IE7 doesn't fix any of the memory leak problems. They released some fixes and marked the bug fixed, but it's still not fixed."
"IE8 won't fix the memory problem either, since the rendering engine is built on COM and they're not going to reengineer that any time soon."
"If you use GWT and obey the rules for using it, you will not leak memory."
Topics: GWT
Comments: 2 so far
Leave a comment
About Pathfinder
Recent
- Push Button Phones and the Limits of User Testing
- Firefox Plugin Malware ‘Trojan.PWS.ChromeInject.A’
- Pathfinder releases version 1 of the its Flash Platform microsite (codename Mica)
- Pimp my Rails: Five Plugins & Gems to Make Rails Better
- iPhone: Using Pre-processor Directives for Device Testing
- Subtle OpenGL Projection Matrix Difference Between iPhone Simulator and Device
- App Security: Throw Out the Org Chart!
- Pimp my jQuery: Five plugins to replace the features Prototype and Scriptaculous users expect
- Thanksgiving 2008: What We’re Thankful For (In Rails)
- iPhone SDK: Testing with TextMate & GTM
Archives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006


Which bugs were marked fixed when they weren’t fixed?
Comment by Ben Fulton, Thursday, December 6, 2007 @ 5:42 am
How GWT has solved this memory leak problem? There is no mention in the article
Comment by Antonio, Thursday, September 25, 2008 @ 7:45 am