Skip to content

fix: remove auto-install feature from local CLI for better performance - #631

Merged
fengmk2 merged 3 commits into
mainfrom
remove-auto-install
Feb 27, 2026
Merged

fix: remove auto-install feature from local CLI for better performance#631
fengmk2 merged 3 commits into
mainfrom
remove-auto-install

Conversation

@fengmk2

Copy link
Copy Markdown
Member

The vp run command was automatically running pnpm install before
executing tasks, causing serious performance degradation. Remove the
entire auto-install feature:

  • Delete create_install_synthetic_request() and auto-install block
    from execute_vite_task_command() in the NAPI binding
  • Remove VITE_DISABLE_AUTO_INSTALL env var from 147 snap test files
  • Delete auto-install-before-task snap test and benchmark script
  • Update docs and RFCs to remove auto-install references

@fengmk2fengmk2 self-assigned this Feb 25, 2026
@fengmk2Graphite App

Copy link
Copy Markdown
MemberAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2Graphite App

Copy link
Copy Markdown
MemberAuthor
Here are the benchmark results using vp run lint on main (hyperfine, 20 runs): Cold cache (after vp cache clean) ┌─────────────────────────────────────────────────────┬─────────┬─────────┬─────────┐ │ Scenario │ Mean │ Min │ Max │
├─────────────────────────────────────────────────────┼─────────┼─────────┼─────────┤
│ Auto-install enabled (main default) │ 2,168ms │ 1,817ms │ 2,633ms │
├─────────────────────────────────────────────────────┼─────────┼─────────┼─────────┤
│ Auto-install disabled (VITE_DISABLE_AUTO_INSTALL=1) │ 610ms │ 462ms │ 1,241ms │
└─────────────────────────────────────────────────────┴─────────┴─────────┴─────────┘
Auto-install overhead: ~1.56s per invocation (3.6x slower)
Warm cache (task cache hot)
┌───────────────────────┬───────┬───────┬─────────┐
│ Scenario │ Mean │ Min │ Max │
├───────────────────────┼───────┼───────┼─────────┤
│ Auto-install enabled │ 524ms │ 414ms │ 1,201ms │
├───────────────────────┼───────┼───────┼─────────┤
│ Auto-install disabled │ 448ms │ 383ms │ 1,029ms │
└───────────────────────┴───────┴───────┴─────────┘
Auto-install overhead: ~77ms per invocation (1.17x slower) — the install result itself gets cached by
the task runner, so warm overhead is lower.
Raw baseline
┌───────────────────────────────────┬──────────────┐
│ Measurement │ Time │
├───────────────────────────────────┼──────────────┤
│ pnpm install (already up to date) │ 1,650ms mean │
└───────────────────────────────────┴──────────────┘
The cold cache overhead matches the raw pnpm install cost almost exactly. On warm cache, the task
runner caches the install result, but there's still ~77ms overhead for cache lookup + package manager
resolution. Note: the original benchmark script (bench/benches/auto_install.sh) was testing vp lint
which goes through execute_direct_subcommand and was never affected by auto-install — so it would
have shown no difference.

@fengmk2fengmk2 added the test: e2e Auto run e2e tests label Feb 25, 2026
@fengmk2
fengmk2force-pushed the remove-auto-install branch 2 times, most recently from 9161b6c to e17de28CompareFebruary 26, 2026 11:35
The `vp run` command was automatically running `pnpm install` before
executing tasks, causing serious performance degradation. Remove the
entire auto-install feature:
- Delete `create_install_synthetic_request()` and auto-install block
from `execute_vite_task_command()` in the NAPI binding
- Remove `VITE_DISABLE_AUTO_INSTALL` env var from 147 snap test files
- Delete `auto-install-before-task` snap test and benchmark script
- Update docs and RFCs to remove auto-install references
Print a warning and skip test case directories that are missing
steps.json instead of crashing with ENOENT.
@fengmk2
fengmk2 marked this pull request as ready for review February 26, 2026 14:32
Instead of warning and skipping, directories without steps.json now
cause a hard error so CI won't silently drop test cases.
@fengmk2Graphite App

fengmk2 commented Feb 27, 2026

Copy link
Copy Markdown
MemberAuthor

Merge activity

  • Feb 27, 2:32 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 27, 2:33 AM UTC: @fengmk2 merged this pull request with Graphite.

@fengmk2
fengmk2 merged commit 08a5993 into mainFeb 27, 2026
39 checks passed
@fengmk2
fengmk2 deleted the remove-auto-install branch February 27, 2026 02:33
fengmk2 added a commit that referenced this pull request Aug 3, 2026
The local CLI auto-install feature and the only consumer of
`VITE_DISABLE_AUTO_INSTALL` were removed in #631, but snapshot fixtures
and RFC examples still set the environment variable.
This PR removes those obsolete settings while preserving the unrelated
`GITHUB_ACTIONS` fixture environment and the generic snapshot schema
example.
No behavior changes.
🤖 Generated with Codex
Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2eAuto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@fengmk2@cpojer