Discovered by Radim Tlusty investigating
JBWS-932 Performance bottleneck when marshalling array types.
" I have made deeper analyse of this issue using JBoss profiler and I have found the main bottleneck.
Most of time was spent in class org.jboss.xb.binding.Content in method handleContent(ContentHandler). There is used LinkedList (attribute content), but inside of method handleContent() is called 'content.get' . This list is big for large documents and the access of linked list elements by index is of course slow.
For my test purpose I have only interchanged the LinkedList by ArrayList and my test case which took before 97s is now ready in 7s. Only for comparison: in JBoss 4.0.4.RC1 with JBoss-WS4EE it lasts 2s and in Sun Application server 9 it's 0,6s. So there is still place for improvement.
Sorry, that I don't provide patch for it, but I'm sure the author (Alexey) will solve it better."