Re: [PATCH] write-tree performance problems
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Apr 19, 2005, 21:23 UTC
- Message-ID
- <Pine.LNX.4.58.0504191420060.19286@ppc970.osdl.org>
- In-Reply-To
- <200504191708.23536.mason@suse.com>
On Tue, 19 Apr 2005, Chris Mason wrote:
> > Regardless, putting it into the index somehow should be fastest, I'll see what > I can do.
Start by putting it in at "read-tree" time, and adding the code to invalidate all parent directory indexes when somebody changes a file in the index (ie "update-cache" for anything but a "--refresh").
That would be needed anyway, since those two are the ones that already change the index file.
Once you're sure that you can correctly invalidate the entries (so that you could never use a stale tree entry by mistake), the second stage would be to update it at "write-tree" time.
Linus