File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes validation performance penalty? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "validation performance penalty?" Watch "validation performance penalty?" New topic
Author

validation performance penalty?

Kathy Shkarlet
Ranch Hand

Joined: Dec 01, 2000
Posts: 43
Hi all,
I'd like to know if anybody has estimated performance penalty for using validating versus non-validating parser for both SAX and DOM versions? Is it similar in different implementations -sun and apache are the ones I'm most interested in?
Kathy
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5781
Validating is a resource intensive process and you should expect to see a difference in performance when compared with non-validating parsing. The performace overhead depends among other things, on the size of the XML file being validated and the complexity of the structure. The difference is noticeable for Files greater than 1MB( or closer to, ) in size.
Here is a perormance comparison matrix for various parsers tested with validation. Eventhough the data is quite old, I'm sure this will give you an idea about what to expect.
Hope that helps,
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.


Open Group Certified Master IT Architect.
Sun Certified Architect(SCEA).
Kathy Shkarlet
Ranch Hand

Joined: Dec 01, 2000
Posts: 43
These are interesting numbers, thank you, but I really am only interested in estimating validation overhead.
I certainly could run tests myself, but maybe there's anybody who knows the results?
 
 
subject: validation performance penalty?
 
Threads others viewed
Struts 2 actions thread safe
Death
Annotation used to validate String
Import a non-packaged class??
WA #1.....word association
MyEclipse, The Clear Choice