Re: [PATCH 3/3] use cache for function names in hunk headers
- From
Clemens Buchacher <drizzd@aon.at>
- Date
- Sep 20, 2010, 17:36 UTC
- Message-ID
- <20100920173605.GA13057@localhost>
- In-Reply-To
- <AANLkTikArADX8XviB99VtkkmKmVbs9jHPHw9PNSmiOc3@mail.gmail.com>
On Sun, Sep 19, 2010 at 10:24:52PM +0200, Sverre Rabbelier wrote:
Show 8 quoted lines
> > On Sun, Sep 19, 2010 at 11:59, Clemens Buchacher <drizzd@aon.at> wrote: > > 2.78user 0.01system 0:02.82elapsed 99%CPU > > 0.05user 0.01system 0:00.06elapsed 96%CPU > > Very nice. It would improve the commit message if you could explain > what exactly it is this optimizes though, saving the reader from > having to read through t3419 to find out.
Ok.
The test creates a file with 50000 lines and a one-line change every 10 lines, i.e., about 5000 hunks. Since none of the lines matches a function definition, previous to this optimization, the file was searched 5000 times.
Clemens