Skip to content

[Performance] Low-end hardware performance contract #4

Closed as not planned

Description

@m1ngsama

Goal

Treat shell, prompt, and editor latency as a compatibility constraint. The setup should remain quiet, direct, and usable on older, low-power, low-memory, or high-latency machines without trading away correctness, security, privacy, accessibility, or maintainability.

The reference machine is a ThinkPad X230 with a dual-core CPU, SATA SSD, and 2 GiB of available memory. Results from faster machines are useful observations, not substitutes for that baseline.

Principles

  • Core shell and editor startup must not require a network connection.
  • Startup paths must not perform automatic update checks or unbounded retries.
  • Idle core shell/editor configuration must not poll or create background workers.
  • X11 session services such as Picom, xss-lock, nm-applet, and dex are intentional profile behavior and are outside the zero-background-process goal.
  • Performance changes require a profile or benchmark result; do not rewrite components from intuition alone.
  • A numerical improvement never justifies weaker safety, rollback, provenance, or accessibility.

Measurement contract

  • Use a clean temporary HOME and XDG tree.
  • Separate runtime work from downloads and first-time provisioning.
  • Report active optional host integrations when measuring configured Fish rather than treating them as isolated inputs.
  • Measure Fish without config, configured interactive Fish, prompt rendering outside Git, prompt rendering in a small Git repository, and prompt rendering in a representative large repository.
  • Measure warm Neovim startup only from an already-provisioned, lock-matching data tree and disable every provisioner in benchmark mode. Track first provisioning separately.
  • Record commit, worktree state, hardware, operating system, runtime versions, load, warm-ups, and sample counts.
  • Use at least 100 measured samples before reporting p99. Smaller runs must omit unsupported tail percentiles.
  • Compare measurements only on similar hardware, power, thermal, and load conditions.

Provisional investigation thresholds

These values are hypotheses until the reference-machine baseline exists. They are not GitHub-hosted CI gates.

Metric Initial target Investigate above
Interactive Fish cold p95 100 ms 200 ms
Prompt refresh p99 16.7 ms 50 ms
Warm Neovim p95 200 ms 400 ms
Offline core availability 100% Any startup block
Local bootstrap stage, excluding downloads 30 s 60 s

CI policy

GitHub-hosted runners validate behavior, portability, and bounded failure handling. Pull requests use offline Linux/macOS checks. Dependency installation stays under a 30-minute job ceiling, while the repository check step has a five-minute pull-request ceiling. Network provisioning runs only on main updates or manual dispatch, and the full Neovim cold graph runs only on Linux. Hosted-runner timing is too noisy for absolute startup latency gates; fixed-hardware measurements remain local and explicit.

Current workstation observation

Commit b6e23c7 on an Apple M4 running macOS 15.7.3, with five warm-ups and 100 measured samples:

Metric Observation
Configured Fish startup p50 19.672 ms
Prompt outside Git p99 4.071 ms
Prompt in a small Git repository p99 4.631 ms

Active integrations were eza, lolcat, and zoxide. This run is healthy and comfortably below the provisional prompt investigation threshold, but it is not the X230 acceptance baseline. Warm Neovim was intentionally skipped because a dedicated provisioned data tree was not supplied.

Progress

  • Remove automatic update checks and shell-startup network work.
  • Bound retries, locks, provisioning, rollback, and CI cancellation.
  • Add scripts/benchmark with controlled Fish and prompt measurements.
  • Consolidate prompt branch and dirty-state detection into one Git query.
  • Record a current-workstation observation in Build a reliable personal dotfiles setup #5.
  • Record the first baseline on the ThinkPad X230.
  • Add a representative large-repository prompt scenario.
  • Record warm Neovim measurements from an isolated provisioned data tree.
  • Revisit the provisional thresholds using measured evidence.

This issue is intentionally incremental. Each performance change should be a small, independently verifiable improvement.

Activity

  1. changed the title [-][Performance] 极限设备性能宪章与长期预算[/-] [+][Performance] Low-end hardware performance contract[/+] on Aug 11, 2026
  2. m1ngsama commented on Aug 11, 2026

    @m1ngsama
    OwnerAuthor

    Implemented the current measurement and prompt-optimization slice in #5 at commit b6e23c7. The pull-request checks now complete in 56 seconds on macOS and 59 seconds on Ubuntu while remaining offline. The X230 baseline, representative large repository, and dedicated warm-Neovim measurement remain intentionally open.

  3. m1ngsama commented on Aug 11, 2026

    @m1ngsama
    OwnerAuthor

    PR #5 lands the actionable repository and CI work from this performance contract: a bounded local benchmark, 100-sample Fish and prompt measurements, a generated 5,000-file worktree, exact one-render prompt timing, host-integration reporting, and offline pull-request checks on macOS and Linux. On commit b113a7c, the 5,000-file prompt result was 63.218 ms p99 and exceeded the provisional 50 ms investigation line. Focused comparisons showed the current single Git status query was faster than equivalent multi-process alternatives, so no workflow semantics were removed for a cosmetic threshold. A ThinkPad X230 and a persistent fully provisioned warm-Neovim measurement tree are unavailable; those two baselines are explicitly waived, not claimed complete. The original checklist remains unchanged to preserve that distinction. Closing as not planned for the unavailable hardware/data-dependent remainder; a focused measurement issue can be opened if those inputs become available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions