Re: [PATCH v2 1/2] dir: consider worktree config in path recursion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Is this _complete() necessary?

It is not.  Though _complete won't actually change the buffer if the
trailing character matches, I've removed it.  The '/' is added prior
to each call here [1].

[1]: https://github.com/git/git/blob/277cf0bc36094f6dc4297d8c9cef79df045b735d/dir.c#L2329

> This function is repeatedly called during the traversal.
>
> How expensive is it to keep calling real_pathdup() on the constant
> the_repository->gitdir just in case it might be the same as our true
> GIT_DIR?

Using trace2, `real_pathdup` takes around 40 usecs on my machine
compared to 10 usecs for an empty region.

Please see the cover letter for v3 of the patch series for additional
details on both of these items.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux