Open JaroslavTulach opened 1 year ago
Working on #5698 I find out that the transfer of suggestion DB is actually happening in binary channel:
Debugging confirms the expectation. The data seem to be sent as binary.
I see many messages sent through json-rpc connection: I can easily read them, so they probably are not binary. Or is it some web socket magic?
Are you sure you're not confusing suggestion db updates with visualization value updates? AFAIK, only the latter are sent through binary channel.
Thanks @farmaazon - there is double serialization/deserialization inside of single(!) LS/engine process - maybe I got confused by that.
@JaroslavTulach I fully agree. All data should be in a binary format, minimized, and as small as possible.
Summary
Would it be more effective to transfer suggestion DB (tracked as #5068) & co. as binary, not as JSON? That's a question asked by startup performance measurements as of Feb 6, 2023.
Value
Can we speed things up by not sending JSON, but binary data? For example the suggestion DB (tracked as #5068) could be sent as binary. The drawback is that the IDE would have to be modified to accept the protocol change. Sticking to JSON allows us to modify just the engine part.
Specification
Prototype sending the suggestion DB as binary, not as JSON.
Acceptance Criteria & Test Cases
Related
5741 - right now the
Suggestion
list is encoded into binary JSON, sent from engine torunner.jar
, deserialized, converted to other data structure, serialized into JSON and then sent to the IDE. Unless the multiple serialization/deserialization is eliminated it makes little sense to think about changing the form of transfer.