Skip to content

Parallelize git ls-remote calls in UpdateChecker #275

@bguidolim

Description

@bguidolim

Context

UpdateChecker.checkPackUpdates() runs git ls-remote serially for each pack. With N packs, this takes O(N × RTT). The SessionStart hook has a 30-second timeout — with 5+ packs on a slow connection, serial calls could exhaust the budget.

Currently mitigated by the 7-day cache (network checks are rare), but when they do run, parallelism would reduce latency.

Proposed Change

Use DispatchQueue.concurrentPerform(iterations:execute:) or Swift concurrency (withTaskGroup) to run git ls-remote calls in parallel. Each call is independent — no shared mutable state.

Considerations

  • Swift 6 concurrency safety: PackEntry is Sendable (all let fields), ShellRunner needs verification
  • Per-process timeout on individual git ls-remote invocations (currently none)
  • Thread-safe result collection

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priorityenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions