I ran some profiling and I believe the issues might arise from the searchInheritance method of MarshalFramework. For me this method is called repeatedly with a class names that do not exist. Here is a stack trace of the call
Thread [main] (Suspended)
ClassDescriptorResolverImpl.loadClass(String, ClassLoader) line: 650
ClassDescriptorResolverImpl.resolve(String, ClassLoader) line: 395
MarshalFramework.searchInheritance(String, String, XMLClassDescriptor, ClassDescriptorResolver) line: 349
Marshaller.marshal(Object, XMLFieldDescriptor, ContentHandler, Marshaller$MarshalState) line: 1187
Marshaller.marshal(Object, XMLFieldDescriptor, ContentHandler, Marshaller$MarshalState) line: 1824
Marshaller.marshal(Object) line: 821
SpeedTest.main(String[]) line: 33
I think one possible bug might be near the bottom of ClassDescriptorResolverImpl.resolve. The code looks for a class descriptor class. This is not found and a ClassNotFoundException is thrown. The catch saves details but uses the className variable. I think it perhaps should use the dClassName variable instead.
Hmm. Yes, this could and should be added to the FAQ, or even better to the newly created XML best practice document.
Having said that, I wonder why this has such an huge effect on performance ?