Re: [PATCH v2 5/6] odb/source-files: avoid stat'ing already-known alternates
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Oct 27, 2026, 12:36 UTC
- Message-ID
- <CAP8UFD1-Fh-fiGpFiVtBk09JygbD0P5fOYHgXjvk1X+YUCVyPQ@mail.gmail.com>
- In-Reply-To
- <20261023-pks-odb-files-reload-alternates-v2-5-30559d7ff43b@pks.im>
On Fri, Oct 23, 2026 at 2:48 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 9 quoted lines
> > When adding alternates we first check whether the alternate exists > before checking whether we already know about it. This results in a > useless stat(3p) syscall in the case where we already track the > alternate. > > Reorder the logic so that we first check whether we know the alternate > already before checking whether its directory exists to avoid the > syscall.
Does avoiding the syscall means not printing the "object directory %s does not exist" error then, when we know the alternates but its directory was removed?