fixes for live build graph, and compilation #35
Merged
+84
−56
Conversation
This fixes two serious problems with compilation. Firstly, the use of a Future running in the same execution context as the compilations seemed to be causing greater contention on the thread pool, and thread starvation. This was resulting in the updates to the UI being infrequent and jittery. Secondly, far too much work was being done during compilation: a new Future which spawned a new `bloop` process was being created for every dependency, regardless of whether those modules were already being compiled. Even though `bloop` was probably not duplicating the work, there was some overhead, and no doubt some lock contention in `bloop`. If I recall correctly, building Fury from clean would previously take around 60s. It now appears to take around 30s. Similarly, attempting to rebuild a fully-compiled Fury using a hot compiler now settles at around 350ms, where it would previously take around 1100ms.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This fixes two serious problems with compilation. Firstly, the use of a
Future running in the same execution context as the compilations seemed
to be causing greater contention on the thread pool, and thread
starvation. This was resulting in the updates to the UI being infrequent
and jittery.
Secondly, far too much work was being done during compilation: a new
Future which spawned a new
bloopprocess was being created for everydependency, regardless of whether those modules were already being
compiled. Even though
bloopwas probably not duplicating the work,there was some overhead, and no doubt some lock contention in
bloop.If I recall correctly, building Fury from clean would previously take
around 60s. It now appears to take around 30s. Similarly, attempting to
rebuild a fully-compiled Fury using a hot compiler now settles at around
350ms, where it would previously take around 1100ms.