daml/compiler/daml-lf-tools
Moritz Kiefer cd69b6f553
Cache rewrites of PRSelf references (#2028)
Previously we rewrote references to `PRSelf` to `PRImport` references
every time we call `initWorld`. However, we call `initWorld` quite
often (e.g. every time we run a scenario) while the packages that need
to be rewritten stay constant. Since rewriting the package references
requires traversing the whole package, this can be quite expensive.

This PR moves the rewriting of package references out of `initWorld`
and caches it as part of `GeneratePackageMap`.

On a large project where I tested this, this caused a drop in the
runtime of `daml test` from 250s to 200s. In the IDE this can also
make a pretty big difference since we call this everytime we run a
scenario which we do on every file change.
2019-07-08 08:48:09 +02:00
..
src/DA/Daml/LF Cache rewrites of PRSelf references (#2028) 2019-07-08 08:48:09 +02:00
BUILD.bazel Replace all occurrences of Tagged in DAML-LF AST with newtypes (#1289) 2019-05-21 16:19:57 +00:00