Labels

Showing posts with label Performance Tuning. Show all posts
Showing posts with label Performance Tuning. Show all posts

Pitfalls of Handling Large String Objects in Java

Most Java developers know to be careful about String concatenation. But some argue that it is less important nowadays with improved JVM garbage collection efficiency. That might be true for small objects, but for large String objects, which is common when dealing with web services and xmls, developers need to be even more careful with String operations in general, and not just concatenation.

OOM in Production, Why?


I recently looked into an OutOfMemory exception in production and the culprit turned out to be the following code.


Step-by-Step : How logging caused big performance problem for a JAX-WS web service

This article is about how a small piece of code can cause big performance trouble and how hard it is to figure out the root cause.


What's the Number 1 Java Coding Best Practice?

There are some common known Java coding best practices: use StringBuffer for string concatenation, don't create large objects, cache expensive objects such as DateFormatter, etc.. How important are they? How much performance can you improve by following these practices? 5%, 10%, or 20%?

Then, even the most dilligent developers can not claim that they follow all the best practices all the time, especially with so many 'new' frameworks and standards being adopted. Could you have missed anything?