johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
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
performances?

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 <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

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