diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2017-10-12 09:52:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-12 09:52:38 -0700 |
commit | 65b38764aedf56192568f5d49eb9a9c87257761b (patch) | |
tree | 4041225afc921ffe1ca41230903b9370a5e91273 /templates/modules/modulefile.dk | |
parent | db149876a42ec4cc8db9e488d90d71c7d811a7a6 (diff) | |
download | spack-65b38764aedf56192568f5d49eb9a9c87257761b.tar.gz spack-65b38764aedf56192568f5d49eb9a9c87257761b.tar.bz2 spack-65b38764aedf56192568f5d49eb9a9c87257761b.tar.xz spack-65b38764aedf56192568f5d49eb9a9c87257761b.zip |
Speed up concretization (#5716)
This isn't a rework of the concretizer but it speeds things up a LOT.
The main culprits were:
1. Variant code, `provider_index`, and `concretize.py` were calling
`spec.package` when they could use `spec.package_class`
- `spec.package` looks up a package instance by `Spec`, which requires a
(fast-ish but not that fast) DAG compare.
- `spec.package_class` just looks up the package's class by name, and you
should use this when all you need is metadata (most of the time).
- not really clear that the current way packages are looked up is
necessary -- we can consider refactoring that in the future.
2. `Repository.repo_for_pkg` parses a `str` argument into a `Spec` when
called with one, via `@_autospec`, but this is not needed.
- Add some faster code to handle strings directly and avoid parsing
This speeds up concretization 3-9x in my limited tests. Still not super
fast but much more bearable:
Before:
- `spack spec xsdk` took 33.6s
- `spack spec dealii` took 1m39s
After:
- `spack spec xsdk` takes 6.8s
- `spack spec dealii` takes 10.8s
Diffstat (limited to 'templates/modules/modulefile.dk')
0 files changed, 0 insertions, 0 deletions