On the topic of System.out.println

Erik pointed to the Log4J write-up titled Don't Use System.out.println the other day and yesterday it was the hot story on Javablogs (I kid you not). This does not really have anything to do with Log4J, but here is what the Webpshere best practices paper that I mentioned earlier says about using System.out.println in a web application:

Minimize use of System.out.println.  Because it seems harmless, this commonly used application development legacy is overlooked for the performance problem it really is. Because System.out.println statements and similar constructs synchronize processing for the duration of disk I/O, they can significantly slow throughput.
I did not know that.

Servlet/JSP application performance tips.

Say what you want about big bloated Websphere, but the developer resources, redbooks, white papers, etc. on the Websphere and DeveloperWorks sites are great.  After I wrote most of my WROX JSP chapter on performance, I found a very helpful white paper on Websphere Development Best Practices for Performance and Scalability (340kb PDF).  As far as I can tell, the best practices apply to any J2EE application server, not just Websphere.  Many of the recommendations apply to EJB applications only, but there are also a good number that apply to plain-old Servlet/JSP apps, for example:

  • 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
I had already covered most of the areas mentioned in the white paper, except the thread synchronization and string concatenation tips. I'll add those too. I'm not sure why they don't mention page caching.

We're supposed to be the good guys.

Don't bother with that cockamamie 911 theory, check this instead: dubyadubyadubya.com (Flash required).

Blogger API 2.0.

Dave Winer reports that a developer preview of the XML-RPC-based Blogger API 2.0 has been made available on the BloggerDev group on Yahoo (you'll have to join the group if you want to view the spec). The new spec makes use of XML-RPC structs for just about everything (so it will take some work to support) and finally supports weblog entry titles (but it will be worth it).

Main | Next day (Dec 12, 2002) »