December 11, 2002
JSP/Servlet performance tips
Some good tips from Blogging Roller:
- Don't store too much in each session
- Don't create sessions at all if you can avoid it
- Use database connection pooling
- Avoid string concatenation
- Minimize thread synchronization
- Don't use SingleThreadedModel
Couple more:
- Cache frequently used information
- Keep the number of database hits to the bare minimum
- Avoid unnecessary string comparisons
Posted December 11, 2002 04:09 PM in Java
TrackBack URL for this entry: http://www.unix-girl.com/mt/mt-tb.cgi/407
TrackBack URL for this entry: http://www.unix-girl.com/mt/mt-tb.cgi/407
Comments
On December 12, 2002 01:38 AM Jeremy Zawodny added:
Use Perl. :-)
#
On December 12, 2002 09:15 AM kasia added:
The world needs Java programmers too :)
#
On December 12, 2002 07:39 PM Steve Friedl added:
The "Cache" recommendation must be cautioned with "maintain cache coherency". If information is cached from the database, it might miss updates that matter if other processes can change it.
#
On January 5, 2003 06:14 PM x0r added:
important:
never use class variables in servlets, unless youre 100% sure what youre doing.
Wonderful yaaa
#i need to store bulk of data that should be maintained during a sigle session, data may contain more than 100 records..
Plz, give me the best solution.
thanks.
#