Since we're now getting the snippet max length via the config, could we 
construct the JsonGeneratorImpl directly and pass in a buffer of the correct 
size?

-David


> On Apr 25, 2022, at 2:19 PM, Romain Manni-Bucau <[email protected]> wrote:
> 
> No worries, got it.
> 
> One issue copying the generator is that it will still miss the flush for
> all small objects and for all other cases the heuristic + a simple
> truncation if needed would work with almost no other downsides than not
> being exact but goal was to limit the overflow/cpu/mem so all good IMHO.
> 
> Le lun. 25 avr. 2022 à 22:57, David Blevins <[email protected]> a
> écrit :
> 
>>> On Apr 25, 2022, at 10:47 AM, David Blevins <[email protected]>
>> wrote:
>>> 
>>> The trick with that is there is yet another buffer being held internally
>> by ObjectOutputStream and it recreates the issue.
>> 
>> Just read this again -- this was supposed to be "OutputStreamWriter" not
>> ObjectOutputStream.  Too many years of EJB :)
>> 
>> 
>> -David
>> 
>> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to