Prevent huge allocations in Encoder
Hi! Nice lib, thanks!
I'm working on OOMs here https://github.com/wal-g/wal-g/issues/738 And we need to serialize object to network stream without allocating buffer for all json representation. And we do not know type in advance, so we want a reflective json encoder to stream which flushed data from time to time, say every megabyte or every object of an array. Can this be don with json-iterator?
Thanks!
Try this patch
https://gist.github.com/isedora/7aa627e522f4bacb1514ecb2ba15d7e7
@isedora thanks for the quick response!
The patch seem to have sense, but it's not easy to try... I do not have repro myself :) I'm asking @mannerman to test patched wal-g with patched lib :) I'll try to compose some more comprehansible solution...
I just ran into the same issue. I assumed the encoder would flush certain writes. @isedora, will the patch you've linked be merged eventually?