enso-org / enso

Hybrid visual and textual functional programming.
https://ensoanalytics.com
Apache License 2.0
7.36k stars 323 forks source link

Investigate transfer of Suggestion DB to IDE as binary not as JSON #5570

Open JaroslavTulach opened 1 year ago

JaroslavTulach commented 1 year ago

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

JaroslavTulach commented 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.

farmaazon commented 1 year ago

I see many messages sent through json-rpc connection: image 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.

JaroslavTulach commented 1 year ago

Thanks @farmaazon - there is double serialization/deserialization inside of single(!) LS/engine process - maybe I got confused by that.

wdanilo commented 1 year ago

@JaroslavTulach I fully agree. All data should be in a binary format, minimized, and as small as possible.