Re: [PATCH 0/5] Suggested for PU: revision caching system to significantly speed up packing/walking
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Aug 6, 2009, 23:37 UTC
- Message-ID
- <20090806233739.GL1033@spearce.org>
- In-Reply-To
- <4A7B68C4.8070406@gmail.com>
A Large Angry SCM <gitzilla@gmail.com> wrote:
Show 12 quoted lines
> Shawn O. Pearce wrote: >> Nick Edelen <sirnot@gmail.com> wrote: >>> Hrmm, I just realized that it dosn't actually cache paths/names... >> >> You may not need the path name, but instead the hash value that >> pack-objects computes from the path name. > > Please do NOT expose the hash values. The hash used by pack-objects is > an implementation detail of the heuristics used by the _current_ object > packing code. It would be a real shame to have to maintain backward > compatibility with it at some future date after the packing machinery > has changed.
This is a local cache. If there was a version number in the header, and the hash function changes, we could just bump the version number and invalidate all of the caches.
No sense in storing (and doing IO of) huge duplicate string values for something where we really only need 32 bits, and where a recompute from scratch only costs a minute.
-- Shawn.