Cache and reuse Inflater objects whenever possible.
It turns out that creating and destroying Inflater objects was costing
us a lot of time (about 14% according to the profiling). So this adds
a cache of Inflaters to the WindowCache, thereby allowing all files
sharing the same cache of windows to also share the same set of Inflater
objects.
This change appears to make a huge difference in performance. Before
this change the non-mmap 50,000 commit Mozilla walk case was averaging
4677 ms per 50,000 commit walk. After this change the average has
dropped to a mere 2180 ms. That's just over 2x faster, and puts jgit
at just over 300 ms slower than C git, assuming jgit was able to load
its windows into memory first.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>