diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-06-15 17:23:21 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-06-18 16:57:45 +0200 |
commit | 12ab6ca3d654d25a79c8ef8a40c1d5a2ed671771 (patch) | |
tree | a599f863d7c72b167411b77de15d94263ea74b30 /acct-group/logsurfer | |
parent | cargo.eclass: Add variable alternative to $(cargo_crate_uris) (diff) | |
download | gentoo-12ab6ca3d654d25a79c8ef8a40c1d5a2ed671771.tar.gz gentoo-12ab6ca3d654d25a79c8ef8a40c1d5a2ed671771.tar.bz2 gentoo-12ab6ca3d654d25a79c8ef8a40c1d5a2ed671771.zip |
cargo.eclass: Optimize GIT_CRATES check
Optimize the GIT_CRATES check to call `declare -p` only if the variable
is actually set. In the vast majority of ebuilds using cargo.eclass,
it's not set, so the subshell-first approach is slowing things down.
With this change, the speed improves by another ~20%:
```
real 363 it/s
user 365 it/s
```
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'acct-group/logsurfer')
0 files changed, 0 insertions, 0 deletions