I can't tell you why it's slow on your system, or configuration, but if loading the mapping file is the only thing that's slow...then I don't really see a big problem.
The mapping file should only be loaded once and should be saved in memory for successive calls to the Unmarshaller/Marshaller. So it should be a one-time penalaty that should be done outside any loops.
--Keith
Tzvetan Mikov wrote:
Hi, I've been using Castor version 0.9.5.3 to unmarshal XML configuration files. I am using runtime descriptors with a mapping file. It works great, but it is _extremely_ slow. Only the loading of the mapping file (the loadMapping() call) takes more than a second (about 1200 ms)! My mapping file is nothing impressive - 164 lines of XML, 17 classes altogether. (I can post it if necessary).
I am sure that I am doing something blatantly wrong - in the worst case I would expect processing of such a small XML file to take about 20-30 ms, no more.
(The test machine is Athlon XP 2000, using IBM JDK 1.4.2 - I can assure you that everything else runs fast).
My first guess is that the XML parser is actually trying to get the Castor dtd from the Internet, however the simplest test (unplugging the network cable) shows that it isn't the case.
Any ideas will be appreciated.
regards, Tzvetan Mikov
__________________________________ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
