mirror of
https://github.com/enso-org/enso.git
synced 2024-11-24 00:27:16 +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) |
||
---|---|---|
.. | ||
src/main | ||
README.md |
JSON-RPC Server Test
Tests for the JSON-RPC Server.