johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <>
Subject valueBuffer update/rework?
Date Wed, 07 Jun 2017 05:37:01 GMT
Hi guys,

one criticism we often have is our max string length or in code terms
valueBuffer allocation which is not very flexible since we allocate a
buffer of the max string length and with our queue strategy (default) it
leads to #threads * buffer size and lead to OOME if the application uses
some big strings.

One option can be to replace our fallbackCopyBuffer of JsonStreamParser by
a plain StringBuilder or extensible char[] structure and completely drop
our valueBuffer.

Anyone wants to test it - main thing to test to avoid regression is about

Alternative is to change the valueBuffer from a char[] provider to a
ArrayStructure<char> (to define in johnzon) and have multiple
implementations, one backed by a plain array like today, one with the
extensible structure etc and just change our default to use the extensible
structure but we could still use the plain array for perf reasons.

wdyt? Anyone motivated?

Romain Manni-Bucau
@rmannibucau <> |  Blog
<> | Old Blog
<> | Github <> |
LinkedIn <> | JavaEE Factory

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message