how much memory will be freed by the soft reference? if it's not a big
chunk, most likely not worth it, soft references are released only
when your VM is really, really in trouble. by the time it gets
released, you've been slowed down by repeatedly hitting the ceiling of
your memory and CGed frequently.

just an illustrative story, most likely not related to this usecase
but still interesting
while embedding maven in netbeans, we've SoftReferenced MavenProject
at some point in time. MavenProjects can hold a big object tree,
mostly via the cache in ProjectBuildingRequest. So once you run out of
memory, the SRs get dropped however sometimes the MP instances are
again immediately required, so they are loaded again. And dropped. And
loaded.... and the IDE grinds to a halt. In some cases, one gets OOME
fairly fast, but in others it can take fairly long.

BTW we don't embed maven builds, just MavenProject loading in netbeans

Milos

On Sun, Dec 9, 2012 at 11:04 PM, Christian Schulte <[email protected]> wrote:
> Am 12/09/12 22:58, schrieb Kristian Rosenvold:
>>
>> Anyone else have any ideas about eviction strategies ?
>>
>
> Without having looked at the code. GC driven by using soft references.
>
> --
> Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to