View RSS Feed

Advanced Java

Advanced Java programming.

  1. High Load Web Servlets Performance Tips

    by , 02-18-2012 at 03:19 PM
    • Do not redirect request from the servlet. Always send requests directly from static resources to the web server using URL.
    • Use different web servers for dynamic and static content.
    • Use cache to store content.
    • Manage your RAM to cache content.
    • Use multiple JVMs to balance the load.
    • Limit the number of file descriptors.
    • Do not avoid logging to improve performance. It is more important.
    • Always monitor resources.
  2. Servlet Performance Tips

    by , 02-18-2012 at 03:14 PM
    • Cache static data using jspInit() method.
    • Release static data in jspDestroy() method.
    • To concatenate string use, StringBuffer.
    • Do not use println() method.
    • Do not use PrintWriter to send binary data. Use ServletOutputStream.
    • Always flush data in sections.
    • Use getLastModified() method to handle browser and server cache.
    • Use application server cache.
    • Use session in following order: HttpSession, Hidden fields, Cookies, URL rewriting. ...
    Categories
    Performance
  3. JSP Performance Tips

    by , 02-18-2012 at 03:13 PM
    • Cache static data using jspInit() method.
    • Release static data in jspDestroy() method.
    • To concatenate string use, StringBuffer.
    • Do not use println() method.
    • Do not use PrintWriter to send binary data. Use ServletOutputStream.
    • Do not use sybchronized blocks in service method.
    • Do not create session object with directive <%@ page session="false" %>
    • Scope of ‘useBean’ action should be minimized.
    • Minimize the use ...
    Tags: jsp, performance Add / Edit Tags
    Categories
    Performance
  4. Performance improvement of a Java application

    by , 01-08-2012 at 12:45 PM
    Follow these steps to improve performance of your Java application.

    • Always Pool valuable system resources like threads, database connections, socket connections.
    • Optimize your I/O operations by using buffering when writing to and reading from files and/or streams.
    • Minimize network overheads by retrieving several related items simultaneously in one remote invocation if possible.
    • Apply the following performance tips in your code

    • Use ArrayLists,
    ...