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
Comments
Use Perl. :-)
Posted by: Jeremy Zawodny | December 12, 2002 01:38 AM
The world needs Java programmers too :)
Posted by: kasia | December 12, 2002 09:15 AM
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.
Posted by: Steve Friedl | December 12, 2002 07:39 PM
important:
never use class variables in servlets, unless youre 100% sure what youre doing.
Posted by: x0r | January 5, 2003 06:14 PM
Wonderful yaaa
Posted by: yaa yaa | May 8, 2003 08:58 AM
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.
Posted by: vamshi | August 12, 2003 08:11 AM