Application performance is critical to a usable user interface. Learn about the tools and techniques that Ext GWT developers can use to tune client-side code. Get detailed instructions on how to use the available performance profiling tools including Speed Tracer, Firebug, and Visual Studio.
4. Technology Stack
Ext GWT 2.2.1
GWT 2.1
Java Persistence API (JPA)
Google App Engine (GAE)
RequestFactory
GWT MVP
Dependency Injection with Gin
Download at http://dev.sencha.com/playpen/gxt/conference-app.zip
Monday, November 29, 2010
5. IDE & Plugins
Eclipse IDE for Java EE Developers (Helios 3.6.1)
http://www.eclipse.org/downloads/
Plugins
Maven Integration for Eclipse
http://m2eclipse.sonatype.org/sites/m2e
Maven Integration for Eclipse WTP Integration
http://m2eclipse.sonatype.org/sites/m2e-extras
Google Eclipse
http://code.google.com/eclipse/
Monday, November 29, 2010
7. What to Tune?
Rendering
Ext GWT Layouts
Slow Java / JavaScript code
Memory consumption
HTTP Requests
Data size
Server-side performance
Monday, November 29, 2010
8. Slow Layouts
Too many Layouts and nested Layouts
Replaces layouts with templates and HtmlContainer
Monday, November 29, 2010
9. Slow Java / JavaScript
Must understand what your code is doing an when it is being executed
Step through your code to trace executions paths, do not assume
Monday, November 29, 2010
10. Memory Consumption
Must be careful of objects being kept in memory
Monitor memory usage throughout the application dev lifecycle
Process Explorer on Windows
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
Monday, November 29, 2010
11. Too Many HTTP Requests
Too many requests = bottlenecks
Many browsers only allow 2 concurrent HTTP requests
Analyze the requests your application is making
Use GWT ClientBundle and ImageResource where ever possible
Use Firebug with Firefox and SpeedTracer
Monday, November 29, 2010
12. Too Much Data
Monitor the data being transferred to and from the server
Send the smallest amount of data possible
Do not sending an entire object graph
Monday, November 29, 2010
20. Firebug for Firefox
The must have tool for all GWT developers
DOM inspection and manipulation
Profiles JavaScript code helping you find hotspots in your code
Network monitor
Compile in the “pretty” style so JavaScript is readable
Monday, November 29, 2010
21. Firebug Profiler
Monitor method calls and execution times
Step into problematic code
Monday, November 29, 2010
22. Firebug Network Panel
Monitor all server side requests
Pinpoint bottlenecks
Monday, November 29, 2010
27. Thanks!
Twitter @darrellmeyer
Portions of this presentation from the GWT documentation licensed under the Creative Commons Attribution 3.0 License
Monday, November 29, 2010