Open tresf opened 6 years ago
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.
I'm going to take a crack at this one. I think this can be done with chunking instead of a streaming.
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.
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)