daml/compiler/repl-service/protos
Moritz Kiefer af855e5675
Speed up Daml repl startup (#13172)
* Speed up Daml repl startup

Daml repl startup is stupidly slow to the point where starting up and
executing 1+1 takes ~7s (piped to stdin so no typing included).

This PR speeds this up to ~4.5s. In addition to that, we also display
the repl process sooner and complete the last bit of setup while the
user is typing.

Specifically, we do the following:

1. Startup the JVM process in parallel with initializing our package
   db and only block on it once it’s started (and remove a stupid 1s
   sleep which doesn’t actually matter).
2. Load all packages in one go instead of one by one. This (roughly)
   matches how the script service works.
3. Only block on packages being loaded once we start running the
   script. Users can type before and we even typecheck their stuff
   before.

We could take this further and do even more in parallel with users
typing but this seems to strike a good balance between implementation
complexity, UX (if startup actually fails you get somewhat sensible
errors) & performance.

changelog_begin
changelog_end

* handle tls logs

changelog_begin
changelog_end

* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>

* s/terminateBarrier/exitBarrier/

changelog_begin
changelog_end

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2022-03-09 08:22:42 +00:00
..
BUILD.bazel update copyright headers (#12240) 2022-01-03 16:36:51 +00:00
repl_service.proto Speed up Daml repl startup (#13172) 2022-03-09 08:22:42 +00:00