Skip to content

Evaluating JAXB performance (jaxb2) by comparing it with others technologies

Notifications You must be signed in to change notification settings

samirromdhani/Jaxb-PERF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jaxb-PERF

Table of contents

General info

Evaluating jaxb performance (jaxb2) by comparing it with others technologies

Technologies

Java API

  • JAXB: (jaxb-api 2.3.1)
  • JAXB: (jakarta.xml.bind-api 3.0.0)

CoMPAS SCT Commons

  • JAXB: (jaxb-impl 2.3.6)

Spring (current)

  • JAXB2: OXM (Object XML Mapping)

TODO

  • Jackson
  • Jaxb-V2

Others

  • JAXB-STREAM
  • JIBX

Notes

MarshallerJaxb2Wrapper : Jaxb2Marshaller (org.springframework.oxm.jaxb.Jaxb2Marshaller)

JavaSCLJaxbImpl : (javax.xml.bind.*)

MarshallerWrapper : CoMPAS sct (javax.xml.bind.*)

JakartaSCLJaxbImpl : (jakarta.xml.bind.*)

Links

JAXB on Java 9, 10, 11 and beyond :

https://jesperdj.com/2018/09/30/jaxb-on-java-9-10-11-and-beyond/

JAXB V2 : Partial Unmarshalling

https://github.com/javaee/jaxb-v2/tree/master/jaxb-ri/samples/src/main/samples/partial-unmarshalling

Others

https://stackoverflow.com/questions/65805250/hows-the-performance-of-jackson-compared-to-jaxb-in-creating-xml

https://github.com/beanit/iec61850bean/blob/master/src/main/java/com/beanit/iec61850bean/SclParser.java

Performance Test Report

jaxb2 (spring)

jaxb/v0

jaxb 2.3.1 (java)

jaxb/v1 , jaxb/v2 , jaxb/v3 :

  • Using default package based javax api : org.lfenergy.compas.scl2007b4.model.SCL

jaxb 3.0.0 (java, jakarta)

jaxb/v4 , jaxb/v5 :

  • Using custom package based jakarta api : com.github.jaxblib.xsd.jakarta.model.SCL

    instead of org.lfenergy.compas.scl2007b4.model.SCL

Test unmarshalling

  • convert file to Java objects (SCL)

#1

API Version Type File size File size File size
--- --- 7 MB 70 MB 328 MB
jaxb/v0 JAXB2 2056 ms 18.7 s 1m 35s
jaxb/v1 JAXB 1843 ms 17.6 s 1m 35s
jaxb/v2 JAXB with SAX 1936 ms 19 s 1m 48s
jaxb/v3 JAXB CoMPAS sct 1857 ms 17.6 s 1m 45s
jaxb/v4 JAXB Jakarta 1749 ms 17.5 s 1m 43s
jaxb/v5 JAXB Jakarta with SAX 1930 ms 20.5 s 1m 44s

#2

API Version Type File size File size File size
--- --- 7 MB 70 MB 328 MB
jaxb/v0 JAXB2 2079 ms 18.3 s 1m 43s
jaxb/v1 JAXB 1963 ms 19 s 1m 35s
jaxb/v2 JAXB with SAX 1916 ms 20.2 s 1m 50s
jaxb/v3 JAXB CoMPAS sct 1810 ms 18.8 s 1m 48s
jaxb/v4 JAXB Jakarta 1727 ms 19.4 s 1m 41s
jaxb/v5 JAXB Jakarta with SAX 1917 ms 19.2 s 1m 47s

Test marshalling TODO

  • convert Java objects (SCL) to string or bytes

#1

API Version Type File size File size File size
--- --- 7 MB 70 MB 328 MB
jaxb/v0 JAXB2 ---- ---- ----
jaxb/v1 JAXB ---- ---- ----
jaxb/v2 JAXB with SAX ---- ---- ----
jaxb/v3 JAXB CoMPAS sct ---- ---- ----
jaxb/v4 JAXB Jakarta ---- ---- ----
jaxb/v5 JAXB Jakarta with SAX ---- ---- ----
For memory usage, take a look at tests, github action report or gatling report

About

Evaluating JAXB performance (jaxb2) by comparing it with others technologies

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published