Always use a single WindowCache for the entire JVM
It has become painfully obvious that when creating a Repository
object we do not want to be creating a unique WindowCache for it
at the same time.
Instead we always want to use the same cache for all repositories
so that concurrent access to multiple object stores can efficiently
share the same heap within the JVM. If a repository is being heavily
accessed it should get a larger share of the scarce heap space than
other repositories that are inactive.
We almost support dynamic reconfiguration of our WindowCache limits.
The UnpackedObjectCache can be reconfigured on the fly, but the code
needed to support dynamic reconfiguration of the WindowCache is much
more complex due to the number of private cache control members we
expose out at package level to WindowedFile. I'm glossing over that
until a future change
Since we just about support dynamic reconfiguration we no longer show
that note in the Eclipse preference page and we activate the user's
preferences when the core plugin starts.
By moving everything to be static the cache access machine code will
require less instructions, which should also boost our performance
by a tiny margin, especially in data access heavy operations like a
RevWalk coming from completely unparsed commits.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 files changed: