Skip to content

repo-updater: Reduce allocations caused by scheduler syncing

Warren Gifford requested to merge core/repo-updater-allocations into main

Created by: ryanslade

Our syncScheduler loop has two jobs:

  1. Ensure all indexable repos are in the scheduler
  2. Ensure that any uncloned repos in the scheduler are moved to the front of the queue

For 2, we used to fetch ALL cloned repos and send that entire list to the scheduler which would then compare it's internal state and move any repo NOT in the cloned list to the front of the queue. This caused a large number of allocations in repo-updater.

Instead, we now fetch only uncloned repos managed by the scheduler from the database which will be a much smaller list and can then send this to the scheduler instead.

Merge request reports

Loading