From: "Todd C. Miller" Subject: Re: optimise reading the file index To: Stefan Sperling Cc: Christian Weisgerber , gameoftrees@openbsd.org Date: Thu, 27 Jul 2023 10:15:15 -0600 On Thu, 27 Jul 2023 18:13:00 +0200, Stefan Sperling wrote: > It seems to be about one stat call per file which can't get much better? > > $ find /usr/src | wc -l > 99998 If the current code does stat + open instead of open + fstat there may be some room for improvement. > In any case, this fileindex optimization isn't about making 'got status' > run faster. We noticed a visible delay when starting up tog, where the > newly added base-commit marker takes a short time to appear on some systems. > I determined that the time was spent reading the file index, which prompted > Mark to write this patch. Fair enough. - todd