Re: [PATCH/RFC] Replace ce_namelen() with a ce_namelen field
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Jul 4, 2012, 10:07 UTC
- Message-ID
- <CACsJy8AHqjgDx3PT39LVMeGp=qc3tEqNi9gjMok9V7RG1Bspew@mail.gmail.com>
- In-Reply-To
- <1341393528-21037-1-git-send-email-t.gummerer@gmail.com>
On Wed, Jul 4, 2012 at 4:18 PM, Thomas Gummerer <t.gummerer@gmail.com> wrote:
> Replace the ce_namelen() function in cache.h with a ce_namelen > field in struct cache_entry. This will both give us a tiny bit > of a performance enhancement when working with long pathnames > and is part of the refactoring for the index-v5 file format.
In the name of performance maybe you want to replace strlen(ce->name) with ce_namelen(ce) or ce->ce_namelen. git-grep says there are three occurrences, but you may want to relax the search a bit because it's not always "strlen(ce->name)".
-- Duy