Shopping cart solutions
Narola® InfotechMail for E-commerce Solutionsecommerce Application development

Services

Products


News Events

Best Practices to improve performance in Servlets

Best Practices to improve performance in Servlets

  1. Use init() method to cache static data
  2. Use StringBuffer / StringBuilder rather than using + operator when you concatenate multiple strings
  3. Use print() method rather than println() method
  4. Use ServletOutputStream rather than PrintWriter to send binary data
  5. Initialize the PrintWriter with proper size
  6. Flush the data partly
  7. Minimize code in the synchronized block
  8. Set the content length
  9. Release resources in destroy() method.
  10. Implement getLastModified() method to use browser cache and server cache
  11. Use application server caching facility
  12. Use Mixed session mechanisms such as HttpSession with hidden fields
  13. Remove HttpSession objects explicitly in your program whenever you finish the task
  14. Reduce session time out value as much as possible
  15. Use 'transient' variables to reduce serialization overhead if your HttpSession tracking mechanism uses serialization process
  16. Disable servlet auto reloading feature.
  17. Use thread pool for your servlet engine and define the size as per application requirement.

Shopping cart solutionsCall us or write us to place an inquiry.
Home | About us | Technologies | Services | Products | Blog | Contact | Directory | Article | Knowledge Exchange | Sitemap
© 2005-09 http://www.narolainfotech.com | All Rights Reserved.
Narola Infotech RSS Narola Infotech Resource Sitemap Valid CSS! Valid XHTML 1.0 Transitional