Skip to content

Improve devenv shell and task warm-start performance#464

Merged
schickling merged 14 commits intomainfrom
schickling/2026-03-26-devenv-perf
May 9, 2026
Merged

Improve devenv shell and task warm-start performance#464
schickling merged 14 commits intomainfrom
schickling/2026-03-26-devenv-perf

Conversation

@schickling-assistant
Copy link
Copy Markdown
Collaborator

@schickling-assistant schickling-assistant commented Mar 26, 2026

Problem

The original #464 devenv performance work had drifted behind current main, the latest devenv release, and the current megarepo task contract. It also predated the removal of public nix:hash task surfaces and the newer OTEL dashboard support.

Goal

Revive #464 as the upstream change for the megarepo stack: run on devenv v2.1, keep effect-utils free of private Evergreen assumptions, make shell/task setup faster and more observable, and provide a downstream validation branch that consumes this PR head.

Decisions

  • Rebased the original performance branch onto current main and preserved the nix:hash task removal from the cleanup work that already merged.
  • Pinned devenv.yaml to github:cachix/devenv/v2.1 instead of a temporary post-2.0 commit.
  • Kept the optimized structural pnpm projection fingerprint rather than replacing it with a weaker light hash; the fault matrix showed the light hash misses missing or retargeted projected symlinks.
  • Made the OTEL dashboard task compatible with both otel dash sync and the current otel dash restore CLI shape, and downgraded dashboard refresh failures to warnings during shell entry.
  • Included the effective GVS links directory in the pnpm outer-cache hash so store/GVS root changes invalidate correctly.

Verification

Local checks on this branch:

  • bash nix/devenv-modules/tasks/shared/tests/pnpm-task-smoke.test.sh
  • bash nix/devenv-modules/tasks/shared/tests/setup-cache.test.sh
  • bash nix/devenv-modules/tasks/shared/tests/nix-cli-no-hash-refresh.test.sh
  • CI=1 devenv tasks run nix:test --mode before --no-tui --show-output
  • CI=1 devenv tasks run check:quick --mode before --no-tui --show-output
  • CI=1 devenv tasks run check:all --mode before --no-tui --show-output

GitHub CI for head efb84ac7bcc15b8afecbbf4cd656005513e7a5fc is green, including Linux and macOS nix checks.

Benchmarks from the final local run:

Surface Median Min Max
warm shell 495ms 449ms 562ms
cold setup shell 1440ms 1435ms 1643ms
warm tasks list 395ms 67ms 400ms
warm pnpm:install 301ms 292ms 318ms
warm genie:run 322ms 313ms 349ms
warm mr:apply 308ms 306ms 338ms
warm process/task metadata eval 68ms 58ms 15474ms

The one 15.5s metadata-eval sample was the first eval after a refresh; steady state was ~60-70ms.

Complexity

No new dependency or task abstraction. The main complexity is in preserving the existing cache correctness contract while making status paths cheaper.

Concerns

The downstream megarepo root still exposes a separate full-shell eval bottleneck when exercised with the v2.1 CLI. That appears downstream-specific: task graph listing is fast, but full shell evaluation exceeds 90s before task code runs. The downstream PR documents that separately so this upstream library PR can remain focused.

Follow-ups

  • Add continuous devenv perf regression tracking for warm shell, cold shell/eval, task-list, and representative task-run paths.
  • Decide whether full-shell eval should become a CI budget in downstream repos or a scheduled benchmark lane that records trends without blocking every PR.

References

Posted on behalf of @schickling
field value
agent_name 🌄 co1-vale
agent_session_id ee2f8a7b-5623-4ad7-a682-0dbe5737d042
agent_tool Codex CLI
agent_tool_version 0.125.0
agent_runtime Codex CLI 0.125.0
agent_model unknown
worktree effect-utils/schickling/2026-03-26-devenv-perf-revive
machine dev3
tooling_profile dotfiles@unknown-dirty

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 26, 2026

Storybook Previews

Package Latest URL Last Deploy (Europe/Berlin)
react-inspector https://react-inspector-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
effect-schema-form-aria https://effect-schema-form-aria-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
effect-react https://effect-react-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
notion-react https://notion-react-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
tui-react https://tui-react-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
genie https://genie-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
notion-cli https://notion-cli-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
tui-stories https://tui-stories-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
megarepo https://megarepo-pr-464--overeng-utils.netlify.app 2026-05-08 16:10 CEST
Per-Commit Deploy History

Commit efb84ac · 2026-05-08 16:10 CEST

Package URL
react-inspector https://69fdeeb5a345dbca6f2885cc--overeng-utils.netlify.app
Alias: https://react-inspector-pr-464--overeng-utils.netlify.app
effect-schema-form-aria https://69fdeeb7d49eeef0d4da06ad--overeng-utils.netlify.app
Alias: https://effect-schema-form-aria-pr-464--overeng-utils.netlify.app
effect-react https://69fdeeb6bbaccfd5a3c34fb9--overeng-utils.netlify.app
Alias: https://effect-react-pr-464--overeng-utils.netlify.app
notion-react https://69fdeeb6ba6cc5e547f4897e--overeng-utils.netlify.app
Alias: https://notion-react-pr-464--overeng-utils.netlify.app
tui-react https://69fdeeb77450d4e2a0000fe3--overeng-utils.netlify.app
Alias: https://tui-react-pr-464--overeng-utils.netlify.app
genie https://69fdeeb8bbaccfd280c35176--overeng-utils.netlify.app
Alias: https://genie-pr-464--overeng-utils.netlify.app
notion-cli https://69fdeeb88c6345d0190f2ef9--overeng-utils.netlify.app
Alias: https://notion-cli-pr-464--overeng-utils.netlify.app
tui-stories https://69fdeeba488f04df5bf506a8--overeng-utils.netlify.app
Alias: https://tui-stories-pr-464--overeng-utils.netlify.app
megarepo https://69fdeebdbb4153e21123c603--overeng-utils.netlify.app
Alias: https://megarepo-pr-464--overeng-utils.netlify.app

@github-actions github-actions Bot requested a review from schickling March 26, 2026 21:39
@schickling
Copy link
Copy Markdown
Collaborator

@codex

@schickling-assistant schickling-assistant force-pushed the schickling/2026-03-26-devenv-perf branch from 6147507 to efb84ac Compare May 8, 2026 14:05
@schickling schickling merged commit cc58c81 into main May 9, 2026
13 checks passed
@schickling schickling deleted the schickling/2026-03-26-devenv-perf branch May 9, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants