Closed hubertp closed 1 year ago
Hubert Plociniczak reports a new STANDUP for yesterday (2023-07-05):
Progress: Decided to dig more into startup initialization after another slow session on Windows VM. Profiling revealed #7224. It should be finished by 2023-07-06.
Next Day: Next day I will be working on the #7224 task. Consult with Dmitry on potential solutions, come up with some fix, if possible.
Hubert Plociniczak reports a new STANDUP for yesterday (2023-07-06):
Progress: Went to Dmitry's suggestion to split protocol into pre-initialized and initialized. That did the trick. PR is up. Still tinkering with profiling data to see if there are any other low hanging perf improvements possible. It should be finished by 2023-07-06.
Next Day: Next day I will be working on the #7224 task. Address comments, investigate reconnection work.
Despite JsonRpc being added to the asynchronous resource initialization as defined in language server's MainModule, it is not executed asynchronously.
It is in fact very much synchronous and part of booting process as indicated by the time spent in its initialization
This is because during booting time it is already serving requests (such as
initProtocolConnection
or hearbeat'sinit
), meaning it needs the protocol in place already. It worked, it seems, by accident rather than reporting an NPE. It's very, very tricky to remove this dependency because of this booting cycle.We should still strive to make this process asynchronous as Protocol setup on its own appears to be rather inefficient and takes 0.5 sec.