"jason.greene(a)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
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 :
Reply to the post :