From 34655e1570eee0722cfa44c9596dd1fa77333e3b Mon Sep 17 00:00:00 2001 From: Savil Srivastava <676452+savil@users.noreply.github.com> Date: Tue, 3 Oct 2023 16:54:23 -0700 Subject: [PATCH] [perf] FillNarInfoCache during nix profile's pendingPackagesForInstallation --- internal/impl/packages.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/impl/packages.go b/internal/impl/packages.go index b340f76cd1b..f951b3871bc 100644 --- a/internal/impl/packages.go +++ b/internal/impl/packages.go @@ -420,6 +420,13 @@ func (d *Devbox) pendingPackagesForInstallation(ctx context.Context) ([]*devpkg. if err != nil { return nil, err } + + // Fill the narinfo cache for all packages so we can check if they are in the + // binary cache. + if err := devpkg.FillNarInfoCache(ctx, packages...); err != nil { + return nil, err + } + for _, pkg := range packages { _, err := nixprofile.ProfileListIndex(&nixprofile.ProfileListIndexArgs{ Items: items,