I wonder if someone has encountered this performance problem in using Castor in
a J2EE container.

Castor 0.9.4.3: unmarshalling a large message (> 200 tags) using mapping files.
 Everything runs pretty fine in a standalone test app (main()) and performance
is reasonable (66 ms) per call.

After it is moved to a J2EE environment (WebSphere), the same method takes well
over 500 ms.  8 times slower.

I stepped through the Castor code and found that it is doing a lot of
Class.forName() in ClassDescriptorResolverImpl.loadClass().  In my case, I only
map a few tags in my mapping file (I only need a small part of the XML file)
and Castor is trying to guess and load non-existing java classes (2 calls to
Class.forName() for each tag).

In J2EE containers, classloading is much slower and it resulted in a bad
performance problem for me.

Even if I create my own class resolver and setIntrospection(false), it is still
doing these Class.forName().

Any ideas of working around this?  Or may I suggest to add some code in
ClassDescriptorResolverImpl.loadClass(), so that it won't do these
Class.forName() when _useIntrospection is false?

Or in general, is there a way to disable "Default Introspection" completely?

Billy Lo.

=====


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to