On Wed, Mar 10, 2021 at 12:59 PM Tatu Saloranta <[email protected]> wrote:
>
> On Wed, Mar 10, 2021 at 12:26 PM 'Kireet Reddy' via jackson-user
> <[email protected]> wrote:

Ok, so looking at this specifically:

...
> >> > However when I actually enabled it for all our data, we noticed things 
> >> > actually running slower. It seems one of our objects in particular got 
> >> > about 10% slower. I captured a java flight recording and it appears the 
> >> > hotspot is in ByteQuadsCanonicalizer._verifySharing (the Arrays.copyOf 
> >> > operations). I also enabled the afterburner module -- not sure if that 
> >> > would have any adverse impacts.
....

It is a bit odd. Copy operation would occur only if the table is
shared and presumably would be a fairly big symbol table for it to
take time
(there is no synchronization in there). But if CANONICALIZATION was
disabled, it should not happen.

But now that I am looking through bootstrapping, it looks like this
setting only affects JsonParsers but not Smile or CBOR parsers.
So I don't think disabling here has any effect. Given this it sounds
like your content does get a lot of unique keys and this is why
every time a copy is likely made.

I think this may explain what you are seeing, assuming documents have
a big number of distinct unique keys: with JSON, canonicalization
being disabled, there is more constant steady overhead. With Smile
this is not the case at the moment, and for larger content negative
impact probably grows with the size of document (which has a larger
set of unique names?).

Ideally Smile and CBOR parsers would allow disabling of
canonicalization. I think I will file 2 issues; while not trivial to
implement
(for JSON things are a bit easier as it can fall back to using
`Writer`-based parser), should be relatively straight-forward.
Downside is that this probably has to go in 2.13 and not in 2.12
patch, depending on how intrusive changes are.

So it looks like I got some work on my plate. :)

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-user/CAL4a10ha9J0oUXz7D5ekc%3D%3DtdzeP0W91b70xmheEDM4MOKx%3DQw%40mail.gmail.com.

Reply via email to