Skip to content

housekeeping: Avoid stat calls when searching for stale files

This MR converts uses of filepath.Walk() to filepath.WalkDir() in our housekeeping mode to avoid stat calls as possible. This is inspired by the recent rollout of OptimizeRepository into production where I've noticed that we're spending ~100ms in the P95 quantile, which feels quite long.

The bigger issue may just as well be that we're spawning git-config(1) to prune unused keys. But that code will eventually go away, and it doesn't hurt to avoid stat anyway.

Merge request reports