Fast Infoset 1.2 and JAXB 2.01
By sandoz on Aug 25, 2006
I created a branch of Fast Infoset (FastInfoset-1_2-branch) with some experimental features for marshalling/unmrsahlling in JAXB 2.1. Latest builds can be found here.
It is mostly about improving the performance of FI serialization when marshalling. JAXB has knowledge of the schema and that knowledge can be used to improve performance (as is for serialization to XML documents).
First, JAXB can pre-encode known local names Strings to UTF-8 so it is not necessary to keep encoding strings for each marshall when using the same JAXB context. Second JAXB can assign unique integers to known local names and qualififed names. Using these unqiue integers it is possible to determin in O(1) time whether a local name or qualified name has occurred before or not when marshalling a JAXB bean and therefore whether the local name or qualified name should be encoded literally or using an index.
For those interested in the gritty details have a look at: LowLevelFastInfosetStreamWriter; StAXDocumentSerializer; and FastInfosetStreamWriterOutput.