Over a million developers have joined DZone.

Checklist for web performance tuning

DZone 's Guide to

Checklist for web performance tuning

· Performance Zone ·
Free Resource
While addressing performance issue in any application, it’s important to note that performance tuning is to be done at various levels. Listed below are few points that help in improving the performance of a web application. 

Presentation Layer

  1. Ensure all CSS on top and Java scripts at the bottom
  2. Avoid expression in CSS
  3. Externalize java script and CSS
  4. If caching is used ensure appropriate caching expiry policy is mentioned
  5. Reduce cookie size
  6. Cache static page like help pages close to presentation layer.
  7. Ensure data stored in cache is in the format required to be presentation layer.

Service layer

  1. Avoid long transactions
  2. Cache application data, that are remain same for all users at server level. 
  3. Go for n-layered architecture than n-tier architecture
  4. Use connection pooling for external connections
  5. Use Java 7’s NIO for any input-output operations

Database Tier

  1. If the volume of data is large and they can be segregated into related groups, perform database sharding, which is a method of horizontal scaling. 
  2. Perform vertical scaling of data if the columns can be segregated as frequently used and less frequently used. 
  3. Cache frequently used parameters and query results


  1. Avoid large data transfer by using GZIP compression
  2. Minimize HTTP requests, use CSS Sprite and image maps
  3. Setup Content Delivery Network (CDN)  if the application content are geographically distributed


  1. JVM Heap size
    • Heap size determines how often and how long VM spends on GC. If Heap size is large, full GC happens slow but frequency is less while if heap size is small, full GC is fast but frequency is high (To determine the most appropriate heap size use verbose –gc.  This will give the exact time the resources are spending on garbage collection. Appropriate measure for the size can be determined by analyzing the reports from verbose –gc.) 
  2. Configure parallel GC & concurrent GC - Parallel GC uses multiple treads for garbage collection and concurrent gc will   stop the application only during the initial mark and sweep phase. Concurrent gc threads run along with application threads. 

Performance monitoring Tools

Listed below are free tools that can be used for performance monitoring
JConsole / Visual VM:   JConsole (or, for more recent Java platform releases, Visual VM) is a built-in profiler that is as easy to launch as the Java compiler.

App Dynamics : App Dynamics is an Application Performance Management (APM) solution that monitors, troubleshoots, and diagnoses problems in mission-critical apps

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}