mirror of
https://github.com/enso-org/enso.git
synced 2024-11-30 05:35:09 +03:00
dd06c59380
As discovered in #7224, Json RPC protocol was added to the asynchronous resource initialization stage, as part of #6306, but was not in fact initialized at that point. Instead it was initialized when the server was started to be able to serve correctly the initialization messages. A classic Catch-22. It was really hard to discover this just by looking at the code, but the profiling clearly showed where the time was spent. This change splits Language Server's protocol into two: - the first one accepts `heartbeat/init` and `session/initProtocolConnection` - the second one enriches it with the full set of supported messages This shifts the initialization from blocking for 0.5 sec to only ~30ms, and performing the second stage asynchronously. Closes #7224. # Important Notes Before the change (blocking server startup): ![Screenshot from 2023-07-05 18-53-24](https://github.com/enso-org/enso/assets/292128/bcfa9043-d00a-4b36-a44c-782a388a16b9) ![Screenshot from 2023-07-05 18-53-10](https://github.com/enso-org/enso/assets/292128/54927787-4c95-46db-bd68-f3a3b82367d5) After the change (1st stage): ![Screenshot from 2023-07-06 14-02-34](https://github.com/enso-org/enso/assets/292128/d7a7bc34-39dc-46f1-9e64-6d350697c30b) After the change (2nd, asynchronous initialization, stage): ![Screenshot from 2023-07-06 14-21-17](https://github.com/enso-org/enso/assets/292128/def8c0a1-f211-4fc0-9df0-7c1634312166) |
||
---|---|---|
.. | ||
akka-native/src/main | ||
cli/src | ||
common-polyglot-core-utils/src/main/java/org/enso/polyglot/common_utils | ||
connected-lock-manager/src | ||
distribution-manager/src/main | ||
downloader/src | ||
edition-updater/src | ||
edition-uploader/src/main | ||
editions/src | ||
interpreter-dsl/src/main/java/org/enso/interpreter/dsl | ||
json-rpc-server | ||
json-rpc-server-test | ||
library-manager/src | ||
library-manager-test/src | ||
locking-test-helper/src/main | ||
logger | ||
logging-service/src | ||
logging-truffle-connector/src/main | ||
logging-utils/src | ||
pkg | ||
profiling-utils/src/main | ||
project-manager | ||
runtime-version-manager/src | ||
runtime-version-manager-test/src | ||
searcher/src | ||
syntax | ||
task-progress-notifications/src/main/scala/org/enso/cli/task/notifications | ||
testkit/src/main | ||
text-buffer/src | ||
version-output/src/main |