Skip to content

Optimize garbage collection process

from thread

Also, the benchmark no longer times out (After running OptimizeRepository)

Great to hear. Another indicator that we should likely reverse the order of ListAllLFSPointers and OptimizeRepository.

Problem

ListAllLFSPointers call can be very slow and cause timeouts if the repository is not optimized. However, in the current code flow we call ListAllLFSPointers first.

Proposal

  • Verify that reversal of the execution order doesn't cause any problems
  • Call OptimizeRepository before ListAllLFSPointers (as an option add after_gitaly_call method and move cleanup_orphan_lfs_file_references in its scope.
Edited by Vasilii Iakliushin