Re: Server JVM
Karl Waclawek <[email protected]>
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
Jimmy Zhang wrote: > I can help you set up server JVM, just a dll file you need to put in > the right place... let me know if you need any help I installed the JDK and tested with the server JVM. It does indeed increase performance significantly, beating Expat on files with lots of markup vs character data (27ms for benchmark_BR vs 49ms for Expat). Question, why should one not always use the "buffer-reuse" version? Expat was still faster on the file with lots of character data (13ms vs 17ms for benchmark_BR). I recompiled the Expat library with all optimizations for speed. Now given that vtd-xml is quite fast, you still have to prove two things: 1) It does everything a conforming non-validating parser must do. How many of the tests in the XML-Test-Suite does it pass? Expat passes all the tests for a non-validating parser except a handful that are optional or in doubt. Example: vtd-xml failed to detect duplicate attributes when they had different prefixes pointing to the same namespace. Completing vtd-xml to conform as well as Expat may well add more overhead. 2) To which degree does it pay off to delay the work of encoding transformation to the point when the data is actually needed, as in a real-world application? If the document is encoded in UTF-8 and your application requires UTF-16, then this is already done by Expat, but for vtd-xml this work still has to be performed. Whether it will be preferable over Expat for documents where memory usage is not an issue, will depend on the answers to these questions. Overall I do like your approach, and I think it is excellent for random access with an in-memory document. It may also do very well on SOAP processing for smaller messages. Karl