chore: fast RPM package count on openSUSE (libmacchina 7.1.0)

This requires the `rpm-devel` package to be installed
This commit is contained in:
Adrian Groh 2023-05-16 10:49:31 +02:00
parent ba2a3d0c5a
commit 852e4e56b6
Signed by: Gobidev
GPG Key ID: 3AA3153E98B0D771
2 changed files with 8 additions and 5 deletions

View File

@ -20,7 +20,7 @@ globset = "0.4.10"
dotenvy = "0.15.6" dotenvy = "0.15.6"
glob = "0.3.1" glob = "0.3.1"
which = "4.4.0" which = "4.4.0"
libmacchina = "7" libmacchina = "7.1.0"
crossterm = "0.26.1" crossterm = "0.26.1"
[profile.release] [profile.release]

View File

@ -32,6 +32,8 @@ If you want a logo to be added, feel free to open an issue or a PR.
## Installation ## Installation
_Note: On openSUSE, install the `rpm-devel` package for faster package count._
### Binary ### Binary
Download a binary from the Download a binary from the
@ -74,10 +76,11 @@ managers. For more info, see [Improving Performance](#imp_perf)._
The by far slowest part of the `pfetch` execution time is counting the installed The by far slowest part of the `pfetch` execution time is counting the installed
packages. For most package managers this is still very fast, but there are some packages. For most package managers this is still very fast, but there are some
(currently `nix` and `zypper`) that take ~500ms to report installed packages, (currently `nix` (and `zypper`, if `rpm-devel` is not installed)) that take
which takes away all performance benefits of the Rust version. If you have one ~500ms to report installed packages, which takes away all performance benefits
or more of these installed, you can skip counting them by setting the of the Rust version. If you have one or more of these installed, you can skip
`PF_FAST_PKG_COUNT` environment variable. counting them by setting the `PF_FAST_PKG_COUNT` environment variable to any
value.
## Configuration ## Configuration