Skip to content

Prefetch apt-get update asynchronously #11

Description

@rolfsormo

Context

`engine/kinds/package.go`'s apt provider runs `apt-get update` once per `devboost apply` invocation via `sync.Once` — deduplicated within a single run, but not prefetched/overlapped with other work. On a machine with several resources to converge, this is currently a blocking step rather than something that runs concurrently while other resources are being diffed/applied.

The idea

Once the CLI orchestrates multiple resources with any real concurrency (it doesn't yet — `DiffAndExecute` runs resources one at a time in dependency order), kick off `apt-get update` at the very start of `apply` (fire-and-forget) so it can finish in the background while unrelated resources (e.g. writing config files, cloning znap) proceed, rather than blocking the first package-install resource that needs it.

Why not now

This depends on the engine actually running independent resources concurrently, which isn't the current design (dependency-ordered, sequential `DiffAndExecute`). Low priority — Linux package installs aren't the slow path devboost's own performance investigation was about (that was shell startup lag, already resolved).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions