[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.jdt] Re: JavaModelCache and how to shrink it

"Gary Karasiuk" <karasiuk@xxxxxxxxxx> wrote in message 
news:h857n3$9k0$1@xxxxxxxxxxxxxxxxxxxx
> I'm not comparing apples to apples (I wish I could)
>
> I am using an adopting product. It's changed, the JRE has changed and the 
> version of the Eclipse Platform has changed.
>
> But in looking at the heap dumps the biggest single difference is the 
> JavaModelCache. And at 63 MB that is a pretty big difference.
>
> The nature of the problem is my customers are saying that we are using 
> more memory (i.e. that we have regressed) from the previous version of our 
> product.
> Is there anything that I can do to force the cache to release some of this 
> memory?

If you take a look at the JavaModelCache code, you'll see that it bases its 
size on the amount of available memory; if you give Eclipse more memory, the 
cache will take correspondingly more.  So one way to cut it down is to 
reduce the -Xmx value you pass to the JVM.

I don't believe there's any other way to shrink it, other than editing the 
JavaModelCache code.  But keep in mind that its size was increased, and its 
algorithm changed, because of problems with the old implementation.

What environment are your customers running on, that 64MB is such a big 
deal?  Is this an embedded platform?