Possible Duplicate:
Java garbage collector – When does it collect?
When people say that garbage collector in Java is slowing the whole application down, what do they really mean by it? Isn’t garbage collector only gets triggered whenever an Object is relieved? Please help me understand. Thank’s!
Take a look at http://developers.sun.com/mobility/midp/articles/garbage/
Basically, if the garbage collector compacts a small heap then the delay is short, but if you have been generating a lot of garbage, and have a large reachable object graph, you can see large delays. New garbage collection algorithms (generational / incremental GC) have mitigated this to some degree but tuning GC is still somewhat a black art.