[jboss-dev-forums] [JBoss XML Binding Development] - Re: XB profiling during the AS start-up

adrian@jboss.org do-not-reply at jboss.com
Wed Sep 30 12:57:38 EDT 2009


"jason.greene at jboss.com" wrote : and it can do direct method invocation as opposed to reflection which is definitely faster.

I think you'll find that that is probably not as relevant as you think.
This is a similar problem to Serialization.

The time it takes to

1) decide what to do - typically a string comparison on an element or attribute name
2) coerce xml data into non-string types

will likely "swamp" the small amount of extra time it takes to invoke a setter via reflection,
most of which is the construction of an Object array to pass to Method.invoke().

That's not to say the difference is unimportant. 
If you have to parse lots of xml, it will definitely add up over time.

e.g. See my 0.4 seconds from 2.4 seconds estimate above (which is probably not
all reflection overhead anyway?)

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257942#4257942

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257942



More information about the jboss-dev-forums mailing list