Re: [PATCH 1/6] add open_nofollow() helper
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Feb 16, 2021, 15:44 UTC
- Message-ID
- <YCvoQBhmCeeR9Cup@nand.local>
- In-Reply-To
- <YCvcoPnDAEWNcv+h@coredump.intra.peff.net>
On Tue, Feb 16, 2021 at 09:54:24AM -0500, Jeff King wrote:
> This is all on Linux, of course. Perhaps other systems with slower > syscalls may be more impacted.
I timed it on macOS, which (as you know) I don't use for daily development, but it's a useful testbed from time to time.
On your branch, 'git check-attr -a' took 193.4ms with O_NOFOLLOW, and 245.3ms without. After touching every .gitattributes file, those numbers shot up to 340.9ms and 346.6ms, respectively.
(All numbers on linux.git, of course).
There isn't an apples-to-apples comparison between my numbers and yours (since my laptop is much slower than yours), but the relative numbers are quite clear that only doing a single syscall is worth it in the non-pathological case.
Thanks, Taylor