I've looked at Castor performance from a larger perspective (not trying to pinpoint where it's slow, just comparing it to other approaches). I haven't seen speed differences of the sort you're talking about between marshalling and unmarshalling - in my tests the marshalling is about 2-3 times faster than the unmarshalling. The difference is larger for smaller files, and if you're using very small files (less than 1K) that may be the reason you see such an extreme difference. I do reuse Marshaller and Unmarshaller instances in my tests.
As for parser performance, the fastest SAX2 parser I know of is Piccolo: http://piccolo.sourceforge.net/ It is non-validating, but undertakes to detect all XML well-formedness errors. I haven't tried using this with Castor yet. Let me know if you do, I'd like to find out about any problems.
- Dennis
Dean Hiller wrote:
Hello,----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
I am currently profiling Castor. Marshalling is in the microseconds performance range which is good for me, but unmarshalling is in the milliseconds range. There is one change I made to the castor code to improve performance of unmarshalling by 18%. In 0.9.4.1, line 517 is a big hit. I move this line to be done in the constructor of Unmarshaller. Now I can construct new UnMarshaller(ButtonPress.class) and keep reusing this one which gives me an 18% performance gain. If this does not
cause problems, can this code be moved to the constructor for later versions.
Also, does anyone now if there are any XML parsers with better performance. The milliseconds range perfomance for us is not good enough and we will be killed later on(It seems unmarshalling is about 20 times slower than marshalling). Any other hints will be helpful also.
thanks,
your friendly profiler,
Dean
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
