> On Feb 5, 2019, at 8:45 AM, Jean-Louis Monteiro <[email protected]> > wrote: > > It has been added a while back when David did some performance > investigations around startup. He realized that Jaxb starts becoming fast > after some iterations but for TomEE, we read descriptors at startup and > then we are done. So we were paying the cost of all the JAXB code > generation without really using it. > > So David trying SXC to generate the getter and setter and use a SAX handler > to parse the file. > That's the only thing I recall but I can look for more information
You nailed it. Data here is I recall the reflection that JAXB does to read all the annotations of a JAXB model that doesn't change only once a few years accounted for about 500 milliseconds of our startup. Meaning, there is no hope of a sub-second startup for TomEE as long as JAXB is in the picture. Here's the thread with my "notes to my future self" as that's the only way I can remember this kind of thing years out. - https://lists.apache.org/thread.html/f14796bacfa82edb249c4f186e471c1056e5dea3d164741937f89086@1355118735@%3Cdev.tomee.apache.org%3E - https://github.com/apache/tomee/commit/4c475bd33f63188d45dda38d00b7f9d8df890c85#diff-d6802cbea6446e0c24100d09b32da8c4 As for SXC, here is the archived codehaus.org page that describes where it was at: - http://web.archive.org/web/20120622083901/http://sxc.codehaus.org/JAXB What I seem to recall is changing approach at some point and seeing if I could get the JAXB classes that are generated by the RI in some way saved to disk so we could avoid the reflection and generation and instead have them simply there from the beginning. I unfortunately didn't take good notes on that or I used an email subject that doesn't allow me to find them. -David
