Skip to content

fish_fossil_prompt runs fossil changes --differ synchronously, causing multi-second prompt freezes #12342

@dlejay

Description

@dlejay

Bug description

The default fish_fossil_prompt calls fossil changes --differ on every prompt redraw.
In large directories or large Fossil checkouts, this command is very slow (tens of seconds), which makes fish appear frozen even with the default prompt and no user customization.

Steps to reproduce

  1. Be in a Fossil checkout with a large working tree (e.g. ~/Library/Application Support)
  2. Start fish with the default prompt
  3. Run any command (e.g. ls, cd, ll)
  4. Observe multi-second pause before the prompt appears

Observed behaviour

The shell blocks for a long time on every prompt redraw.

Measured directly outside fish:

time fossil changes --differ >/dev/null
# ~22 seconds total on my system

Measured in fish:

time fish_fossil_prompt >/dev/null
# ~24 seconds

Expected behaviour

The prompt should be instantaneous.
At most it should use cheap metadata queries, never compute diffs.

Root cause

In fish_fossil_prompt.fish:

set -l repo_status (fossil changes --differ ...)

--differ performs expensive diff computations and scales with repository size.

Why this matters

This affects users out of the box (no custom prompt), makes fish feel unreliable, and violates the expectation that a prompt is O(1).

Environment

Fish version: 4.3.2
Fossil version: 2.20
Terminal: Ghostty 1.2.3
OS: macOS 26.2

AI disclosure

Parts of this report (wording and structure) were drafted with the assistance of an AI language model, based strictly on my own observations, measurements, and reproduced behavior.
All commands, timings, and conclusions were verified manually on my system.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions