tray icon indicating copy to clipboard operation
tray copied to clipboard

Stream JSON Data

Open tresf opened this issue 6 years ago • 3 comments

Currently JSON Data is transferred in one large String causing large heap allocations, especially for base64 jobs.

The JSON parser we use today doesn't offer steaming capabilities, and those that have been attempted vastly change the codebase for the would seem like a marginal gain.

Strategically we may be able to mimic the JSON API used today by wrapping Java EE's JSON parser (which does have streaming capabilities)

tresf avatar Mar 02 '18 01:03 tresf

Turns out streaming JSON is entirely possible, but validating the signature would become impossible without stashing the contents before sending, which would negate the performance gains. Closing as wontfix for now.

tresf avatar Mar 31 '18 05:03 tresf

I'm going to take a crack at this one. I think this can be done with chunking instead of a streaming.

Vzor- avatar Apr 17 '18 05:04 Vzor-

So data chucking from a JavaScript perspective certainly helps the memory consumption, but the increased chatter to the websocket and signing cause it to double and triple the print times when compared to just sending the large data to begin with. I think we'll close this as wontifx and place the big-data branch on the shelf for now.

tresf avatar Aug 24 '18 03:08 tresf