• Post Reply Bookmark Topic Watch Topic
  • New Topic

Garbage Collector with big collections  RSS feed

 
Marc Larochelle
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a web application that fill a HashMap with SoftRefence objects.
Some pages of the application can fill the HashMap with 1-2k of those objects. When the heap space is all filled up, the garbage collector seems to remove only like 100-200 objects, so when the next user displays a page, the heap space is maxed again and the gc goes on.. So the application is really slow when the heap space is fill. Is there a setting for the GC to tell it "Hey, remove more soft referenced objects please..." or is there something I can do about that ?

Thank you !
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you switch to having a single SoftReference to the whole HashMap, and storing the referenced objects directly in the HashMap?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!