Skip to content

perf(global): cache prefix records, parallelize conda-meta parsing, fast trampoline check#6513

Draft
Hofer-Julian wants to merge 1 commit into
mainfrom
claude/pixi-performance-improvements-5vpepk
Draft

perf(global): cache prefix records, parallelize conda-meta parsing, fast trampoline check#6513
Hofer-Julian wants to merge 1 commit into
mainfrom
claude/pixi-performance-improvements-5vpepk

Conversation

@Hofer-Julian

Copy link
Copy Markdown
Contributor

pixi global commands re-parsed every environment's conda-meta/*.json —
tens of MBs of JSON for Python-sized environments — many times per
invocation: the sync check, exposing executables, shortcuts and
completions each triggered a full parse, plus one parse per direct
dependency when looking up designated packages.

  • Cache the parsed prefix records per environment on Project, shared
    across clones and invalidated whenever the prefix is modified
    (install, environment removal, pruning, and menuinst rewrites).
  • Parse conda-meta records in parallel (rayon via
    Prefix::find_installed_packages) in find_package_records instead of
    reading them sequentially one file at a time, and reuse the project
    cache in the list commands so 'pixi global list' parses each
    environment once instead of twice.
  • Answer Trampoline::is_trampoline from file metadata in the common
    case: verify the shared trampoline binary against the embedded one
    once per process, then treat hard links to it as trampolines instead
    of reading and comparing the full ~1MB binary for every exposed
    executable on every sync.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01UZeFV9B6ECmc43Rppj8G1U

…ast trampoline check

pixi global commands re-parsed every environment's conda-meta/*.json —
tens of MBs of JSON for Python-sized environments — many times per
invocation: the sync check, exposing executables, shortcuts and
completions each triggered a full parse, plus one parse per direct
dependency when looking up designated packages.

- Cache the parsed prefix records per environment on Project, shared
  across clones and invalidated whenever the prefix is modified
  (install, environment removal, pruning, and menuinst rewrites).
- Parse conda-meta records in parallel (rayon via
  Prefix::find_installed_packages) in find_package_records instead of
  reading them sequentially one file at a time, and reuse the project
  cache in the list commands so 'pixi global list' parses each
  environment once instead of twice.
- Answer Trampoline::is_trampoline from file metadata in the common
  case: verify the shared trampoline binary against the embedded one
  once per process, then treat hard links to it as trampolines instead
  of reading and comparing the full ~1MB binary for every exposed
  executable on every sync.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UZeFV9B6ECmc43Rppj8G1U
@Hofer-Julian
Hofer-Julian force-pushed the claude/pixi-performance-improvements-5vpepk branch from 0954921 to 16dc66f Compare July 3, 2026 13:11
@Hofer-Julian
Hofer-Julian marked this pull request as draft July 6, 2026 07:42
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