Skip to content

make nix detection faster#60

Draft
victorbash400 wants to merge 1 commit into
devfrom
conversion/upstream-pr-60
Draft

make nix detection faster#60
victorbash400 wants to merge 1 commit into
devfrom
conversion/upstream-pr-60

Conversation

@victorbash400

@victorbash400 victorbash400 commented Jun 17, 2026

Copy link
Copy Markdown

Imported from upstream pull request fastfetch-cli/fastfetch pull request 2113: fastfetch-cli#2113

Original author: lhz07
Original state: OPEN
Original labels: none
Original assignees: none


Counting nix-user and nix-default sequentially is quite slow.
On my MacBook, it takes around 120 ms (measured with fastfetch --stat).

This PR changes the implementation to call nix-store in parallel, reducing the time to about 80 ms on my machine.

It also removes the hash cache. In practice, the cache only improves performance by roughly 10 ms, while a cache miss (when the hash changes) can take up to 230 ms, making the overall behavior worse.

@victorbash400 victorbash400 added upstream-import Copied from the upstream repository. upstream-pr Copied from an upstream pull request. labels Jun 16, 2026
@victorbash400 victorbash400 changed the title [Upstream PR] make nix detection faster make nix detection faster Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream-import Copied from the upstream repository. upstream-pr Copied from an upstream pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants