Improve hit performance on the UnpackedObjectCache
If the JVM cleared one of our SoftReferences we "leaked" the space in
the cache that the entry occupied. Over time this meant we lost room
in the cache and didn't have a way to recover that when we replaced
the evicted entry.
The hash function was also too complex for the hit ratio we were
getting. The old function on one of my linux-2.6 clones was giving
us <7% hit ratio; this new function is a little simpler to compute
and is getting ~11%. Increasing the size of the hash table helps
matters considerably.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>