Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add '/bin' prefix database #130

Open
jakobkukla opened this issue Nov 12, 2024 · 2 comments
Open

Add '/bin' prefix database #130

jakobkukla opened this issue Nov 12, 2024 · 2 comments

Comments

@jakobkukla
Copy link
Contributor

I want to use this as command-not-found replacement. As far is I can tell this only provides full database builds. On my system the command-not-found script takes 3s to execute with the full db.

Could we have an option to download and use a prefix filtered db instead like nix-index --filter-prefix '/bin/'? Or maybe even have an option to provide both and use the smaller one for the command-not-found script?

@Mic92
Copy link
Member

Mic92 commented Nov 24, 2024

How fast is the bin database in comparison? I wonder if nix-index could not somehow compute the smaller database from the bigger one.

srid added a commit to juspay/nixos-unified-template that referenced this issue Dec 21, 2024
@gvolpe
Copy link

gvolpe commented Dec 21, 2024

@Mic92 it's significantly faster. Using nix-index with the full database is borderline unusable for me; when I type a command not found, it takes about 2/3 seconds to display the results. Instead, with a smaller database generated via nix-index --filter-prefix '/bin/', the results are displayed immediately.

Could we have an option to download and use a prefix filtered db instead like nix-index --filter-prefix '/bin/'? Or maybe even have an option to provide both and use the smaller one for the command-not-found script?

It would be great if this could be supported 🙏🏽

For now, I use a local database, but also with this fork for nix command support: gvolpe/nix-index#1

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

No branches or pull requests

3 participants