Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The cited article also shows benchmarks from 2017 in which Jackson parser was out performing GSON in the large file category. We can surmise that there is a constant battle between these objectMappers and Jackson may begin out performing GSON again in the future. For example this article from 2019 with new benchmarks states that the difference between the different mappers is negligible, with Jackson mapper having a slight lead with larger files.

Test Results

Write Read 5.12 microseconds
ParserRead 40 charactersWrite 40 characters Read 100 charactersOperationExecution time in microsecondsIssues
40 characters100 characters1000 charactersWrite 1000 charactersIssues
JacksonJacksonRead7.488 microseconds0.296 microseconds10.984 microseconds0.567 microseconds50.49 microseconds1150 
GSON0.509 microseconds0.531 microseconds0.818 microseconds1.332 microseconds8.212 microseconds14.884 microsecondsRead<1<18GSON parses all numerical values to Doubles and as such it unable to dynamically allocate the object type that it is parsing 

Resolution

It would make the most sense to use GSON as much as possible as it is the faster than Jackson. However the practicality of Jacksons parsing cannot be overlooked. Therefore it would make sense to use the Jackson parser in this scenario. We also don't want to have or create a Jackson mapper and GSON mapper object in the same file however as the memory cost is quite high.

...

JacksonWrite<1<15
GSONWrite<1115


ParserProsCons
Jackson

Consistent conversion of numerics
More widely used
Faster writes ****
Built into Spring Framework
Has annotation support

Slower Read
GSON

Faster Reads
May be more beneficial for reading yang modules if in future we find that processing is slow

Converts numerics to Doubles
Less Popular

Consensus

Current Team Consensus is to use the Jackson Parser mainly due to the benefit of being able to parse numerical objects to the correct type and because the magnitude difference between the two parsers is in microseconds.

View file
nameParser Decision-20211022_100240-Meeting Recording.mp4
height150

CPS-NCMP

Temporal

...

  • Jackson

...


Independent Testing Output

...