I've added JAXB to the mix and modified the test.
Fast jaxb shows the best time (even on the first warm up run).
I've run simple comparison tests for fastjaxb from resteasy and
xb based
on the "person" test from fastjaxb.
The results don't look that promising for fastjaxb, especially taking
into account its binding features at this point are still primitive.
repetitions - number of unmarshallings of Person
total - total time in ms for all the repetitions
avg - average time ms for single repetition
repetitions 1
fast jaxb total=139, avg=139.0
xb total=47, avg=47.0
repetitions 10
fast jaxb total=151, avg=15.1
xb total=106, avg=10.6
repetitions 100
fast jaxb total=249, avg=2.49
xb total=286, avg=2.86
repetitions 1000
fast jaxb total=1057, avg=1.057
xb total=1402, avg=1.402
I posted the test code on the forums if you want to review
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257880
Bill Burke wrote:
> I already looked into serializing bindings with JBossXB. Binding time
> was slower although I didn't try to optimize this and really just made
> everything serializable.
>
> I really think we should look into XJC generated models as they use the
> ObjectFactory pattern which is may be much faster than class introspection.
>
> I also *don't* think you are going to get Unmarshalling times down.
> JBossXB was *very* comparable to Sun's JAXB implementation.
>
> The "fast-jaxb" stuff I did (code generation) has no overhead since is
> purely code generation. It also does no reflection. I'd like to see
> how XJC generated code improves anything if at all before persuing this
> further.
>
> Alexey Loubyansky wrote:
>> I'll continue on the forums
>>
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255559
>>
>> Alexey Loubyansky wrote:
>>> To get an idea of what's taking time in XB during the AS start-up, I
>>> added simple time checks for three things:
>>> - creation of unmarshaller instances (parsers)
>>> - schema binding (parsing of JBossXB/JAXB annotations)
>>> - unmarshalling (parsing xml + assembling the Java graph)
>>>
>>> I started the default AS configuration 10 times and here are the average
>>> results.
>>>
>>> AS start-up time: 31226 ms
>>> Init unmarshallers (94 instances): 99 ms
>>> Binding (13 schemas): 1194 ms
>>> Unmarshalling (71 files): 1764 ms
>>>
>>> Total xb time: 3057 ms
>>> Which is around 10%.
>>>
>>> I think first, I'm going to look into serializing/precompiling bindings,
>>> e.g. metadata projects could already include in the releases serialized
>>> schema bindings.
>>> _______________________________________________
>>> jboss-development mailing list
>>> jboss-development(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/jboss-development
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/jboss-development
_______________________________________________
jboss-development mailing list
jboss-development(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development