Re: [PATCH] read-cache.c: fix index memory allocation
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Oct 25, 2011, 00:01 UTC
- Message-ID
- <CACsJy8A7yVk15aAgqDkKTz31rChA7Oj-kS2VT2y2tWS6h01GyA@mail.gmail.com>
- In-Reply-To
- <20111024233427.GA24956@duynguyen-vnpc.dektech.internal>
On Tue, Oct 25, 2011 at 10:34 AM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
Show 7 quoted lines
> "git status" is slow. If your changes causes slowdown, it won't likely > stand out while other fast commands may show (read_cache() is used in > nearly all commands). So I tested using the following patch. > > The result on linux-2.6 shows about 10-20 us slowdown per each > read_cache() call (30-40 us on webkit, ~50k files) I think your patch > is good enough :-)
That was with -O0 by the way. valgrind/massif shows about 200kb memory more with your patch on webkit repository (7.497 MB vs 7.285 MB), using the same test, so memory overhead is ok too.
-- Duy