« About that semantic web | Main | What I want for giftmas »

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. :-)

The world needs Java programmers too :)

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.

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.