|
mmm, just wondering if may be possible that the delay is given something else than castor library loading, have you tried to run a lazy main method class by command line and check if you have the same problem... Just to be sure nothing else is affecting your test... Upon other things why have you the necessity to load those classes as fast as humanly possible... In a runtime envirorment what is the matter? Have you tried to add '-hotspot -Xmx256m -Xms256m' for example this should speedup your class loading... Andrea David Leangen wrote: Hi, Andrea, Do you mean for the tests that I've been running?Actually, I haven't been running them exactly from the command line, but I could put something together if you would like to see. It may not actually be a bad idea to put together some kind of benchmarking tool. Otherwise, are you referring to something else? Regards, Dave-----Original Message----- From: Andrea A. A. Gariboldi [mailto:[EMAIL PROTECTED]] Sent: 27 December 2004 21:44 To: [email protected] Subject: Re: [castor-user] RE: [XML] Performance issues Could you please post the java command line that you are executing? Andrea -----Messaggio originale----- Da: David Leangen [mailto:[EMAIL PROTECTED]] Inviato: lunedì 27 dicembre 2004 13.25 A: [email protected] Oggetto: [castor-user] RE: [XML] Performance issues Andrea, Thanks for the advice! I gave it a try. Again, very non-scientific... it seems that this may help a bit, but I'm still way off my goals. I made another test run using the xml-only JAR, and this time it was 16.297 s. So, although your suggestion was helpful, unfortunately it didn't really get me to where I want to be. Thanks again for pointing this out, though. Cheers, Dave -----Original Message----- From: Andrea A. A. Gariboldi [mailto:[EMAIL PROTECTED]] Sent: 27 December 2004 20:36 To: [email protected] Subject: Re: [castor-user] RE: [XML] Performance issues David, you can find the XML-only library here: ftp://ftp.exolab.org/pub/castor/castor_0.9.5.4/castor-0.9.5.4-xml.jar this library contains no JDO only XML part of castor.. Andrea David Leangen wrote: Just as a follow up to my own post... I tried another test where I ran the same process twice. The first time, classloading is necessary. The second time, however, since the classes were already loaded, the JVM does not need to load them again. Again, we're talking about a very small and simple XML file that is being unmarshalled. First run: 24.031 s Second run: 0.110 s Now, the test cannot exactly be called scientific, but I think it shows convincingly enough that classloading requires almost 24s !!! Or, another way of looking at this is that classloading takes about 240 times as long as running the operation itself. Somehow, this does not seem right to me... So, I guess the big issue is: can this be reduced? What all needs to be loaded, anyway? Is it possible to cut down on some of the extra fat? For instance, is all the JDO stuff (that I'm not using) getting loaded along with the XML stuff? If so, can this be avoided? Cheers, Dave -----Original Message----- From: David Leangen [mailto:[EMAIL PROTECTED]] Sent: 27 December 2004 17:42 To: [email protected] Subject: [castor-user] [XML] Performance issues Dear List [ i.e. Keith ;o) ], Sorry I still haven't got back to you about bug#1782. I will eventually check this out and close the bug... For now, though, I am at the stage where I must gradually start to look into performance issues. I was hoping that you'd have some tips for me regarding Castor. Just to give you an idea, I just made a very rough measurement that indicates that unmarshalling a very small, basic file (only two child nodes under the root, each with 2 attributes) is in the order of about 15 seconds!! What's more is that I'm using precompiled descriptor classes rather than mapping files, so it's not the mapping that is causing me any problems. Do you have any tips that can help me get that down to at most < 1s, preferable < 0.05s? If I can't, then sadly I'll have to ditch Castor when performance becomes a big issue (which may be very soon). However, I've been really happy with it so far and if possible, I don't want to have to do that... Now, that being said, I get the feeling that one of the major issues is classloading, which is not directly a Castor issue. Since Castor is using reflection, the classes are not being loaded until runtime due to Java's lazy classloading. Anyway, any tips you can give me to improve performance would be greatly appreciated! Dave ----------------------------------------------------------- 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 ----------------------------------------------------------- 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 |
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
