Re: [RFC] Dynamic window size on repack?
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jul 8, 2007, 21:39 UTC
- Message-ID
- <alpine.LFD.0.999.0707081437590.31544@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LFD.0.999.0707081429500.31544@woody.linux-foundation.org>
On Sun, 8 Jul 2007, Linus Torvalds wrote:
> > In other words, just look at how the variables "struct unpacked *array" > (the whole window array) and the "struct unpacked *n" (the "next entry" in > the array using a simple circular queue using "idx") are accessed.
Side note: a limit based on object sizes is likely a much better way to handle the window than just a "number of objects" thing ever was. Doing the size in number of objects was easier, and is fine for source code that tends to have a reasonably normal distribution of sized, but yeah, if you have a few really big objects with lots of history, then it's likely the wrong thing to do just because it can get really expensive.
Linus