diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2023-07-09 17:27:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-09 11:27:38 -0400 |
commit | 374fda10630103e2f900fdd15dbf99db97c88716 (patch) | |
tree | eebb417df00f0d69cbebf824d801262999db4b1e /CITATION.cff | |
parent | 3c14569b8e5974509d16ec736cb4982f5981db14 (diff) | |
download | spack-374fda10630103e2f900fdd15dbf99db97c88716.tar.gz spack-374fda10630103e2f900fdd15dbf99db97c88716.tar.bz2 spack-374fda10630103e2f900fdd15dbf99db97c88716.tar.xz spack-374fda10630103e2f900fdd15dbf99db97c88716.zip |
Don’t call spec.format in Database._get_matching_spec_key (#38792)
`"%s" % spec` formats the spec with deps included, which produces sometimes KBs
of data and is slow to run in pure Python. It can delay otherwise very short-lived
read/write locks on the database.
Discovered in #38762 where profile output showed about 2 seconds is spent in
`spec.format`, which is significant overhead when using multiprocessing to install
from binary cache in parallel (installation often takes <5s for small packages). With
this change, `spec.format` no longer shows up in profile output.
(This line hasn't changed since Spack v0.9 ;p)
* move format() call to custom NoSuchSpecError exception
* add a comment saying why, so we can eventually change `Spec.__str__`
Diffstat (limited to 'CITATION.cff')
0 files changed, 0 insertions, 0 deletions