deniz.in

Markets

Weather

Loading weather

· via Vercel blog

Vercel reuses dependency verification across deployments to cut pnpm install times by 14%

Vercel now carries successful dependency verification results across deployments, cutting average pnpm install times by 14% on cached Pro builds and, at best, finishing installs in milliseconds.

Vercel reuses dependency verification across deployments to cut pnpm install times by 14%

Vercel has sped up pnpm dependency installs on its platform by reusing the results of dependency verification across deployments. According to a changelog post on the Vercel blog, Pro deployments with a restored build cache saw average install times drop by 14% once the optimization was enabled, and in the best case installs can now complete in milliseconds.

How the optimization works

Before a project's build command runs, Vercel installs the project's dependencies, and for pnpm projects that install has included a verification pass checking the lockfile against supply-chain policies. Every entry in the lockfile has to clear those checks before the install proceeds, and doing that work on every deployment costs time. In the before-and-after example Vercel published, verifying a lockfile of 461 entries took roughly 2.5 seconds of a 2.8-second install.

The change is that a successful verification is now carried forward to later deployments. When a subsequent build uses the same dependencies, Vercel reuses the earlier result instead of re-vetting each entry, which lets the install step skip almost all of its work. In the same example, the install now finishes in about 135 milliseconds, with the verification output noting that the lockfile had been checked less than a minute earlier. Both figures come from builds using pnpm v12.3.4.

When dependencies do change, with packages added, updated or removed, a fresh verification runs as before, so the fast path only applies when the previous result is still valid for the current lockfile.

What the numbers cover

The 14% figure is an average that Vercel measured across Pro-plan deployments where the build cache was restored. The distance between that average and the millisecond-scale best case reflects how often dependencies actually change: deployments that touch the lockfile still pay for a full verification pass, while commits that only modify application code benefit the most, since their dependency set is identical to the previous build's.

The improvement is available on all plans and applies automatically, with no configuration required, according to the company.

Why it matters

Install time is a tax paid on every deployment, so even a few seconds saved compounds across the builds a team runs each day. CI runs, preview deployments and production releases all begin with the same dependency step, and shortening it tightens the feedback loop between pushing a commit and seeing the result.

The more interesting part is what this does to the trade-off between supply-chain security and build speed. Lockfile policy checks exist to keep unwanted or compromised packages out of a build, but because they add latency to every deployment they create pressure to weaken or bypass them. Reusing a successful verification keeps the control in place while removing most of its recurring cost: teams get a vetted lockfile without re-paying for the check on every deploy. The approach, caching an expensive security check keyed to the artifact it validated and re-running it only when that artifact changes, is a pattern other build and CI platforms could adopt.

The trade-off is that verification is only as fresh as the last time it actually ran. Vercel's output makes this visible by reporting when the lockfile was last verified, and any change to dependencies triggers a full re-check rather than a reused result.

  • #vercel
  • #pnpm
  • #cloud
  • #ci-cd
  • #supply-chain

Related posts