How Synchronization impacts performance

Avoid synchronization where possible. ArrayList is faster than Vector Only List and Map have efficient thread-safe implementations: the Vector and Hashtable classes respectively. Synchronized methods are slower than the identical non-synchronized one. Consider using non-synchronized classes and synchronized-wrappers. FastVector is faster than Vector by making the elementData field public, thus avoiding (synchronized) calls to elementAt(). [...]

How to improve Servlet performance

Use the servlet init() method to cache static data, and release them in the destroy() method. Use StringBuffer rather than using + operator when you concatenate multiple strings. Use the print() method rather than the println() method. Use a ServletOutputStream rather than a PrintWriter to send binary data. Initialize the PrintWriter with the optimal size [...]

How to Improve JSP Page performance

Use the jspInit() method to cache static data, and release them in the jspDestroy() method. Use the jspInit() method to cache static data. Use StringBuffer rather than using + operator when you concatenate multiple strings. Use the print() method rather than the println() method. Use a ServletOutputStream rather than a PrintWriter to send binary data. [...]

Design Patterns : Performance

use the flyweight pattern to reduce object creation [The flyweight pattern uses a factory instead of 'new' to reuse objects rather than always create new ones]. The Singleton pattern and the Flyweight (object factory) pattern are useful to limit numbers of objects of various types and to assist with object reuse and reduce garbage collection. [...]

How to Improve the Java JDBC Performance

Use prepared statements. Use parametrized SQL. Tune the SQL to minimize the data returned (e.g. not ‘SELECT *’). Minimize transaction conflicts (e.g. locked rows). Use connection pooling. Try to combine queries and batch updates. Use stored procedures. Cache data to avoid repeated queries. Close resources (Connections, Statements, ResultSets) when finished with. Select the fastest JDBC [...]

Web Page Performance : How To Improve it

Make Fewer HTTP Requests Use a Content Delivery Network Add an Expires or a Cache-Control Header Gzip Components Put Stylesheets at the Top Put Scripts at the Bottom Avoid CSS Expressions Make JavaScript and CSS External Reduce DNS Lookups Minify JavaScript and CSS Avoid Redirects Remove Duplicate Scripts Configure ETags Make Ajax Cacheable Flush the [...]

Follow

Get every new post delivered to your Inbox.