org.apache.xerces.impl.xs.XMLSchemaValidator$ValueStoreBase.contains() takes way too much time

"Seibert, Olaf" <[email protected]> Tue, 26 Apr 2016 15:23:26 +0000
Newsgroups gmane.text.xml.xerces-j.user
Message-ID <D3455316.4E44%[email protected]>
Hi,

I¹m including some screenshots from jvisualvm showing the time spent in
parsing a rather large (19 MB) xml file in our program.
(See https://tla.mpi.nl/tools/tla-tools/elan/)

We use a Xerces SAX parser, and the overwhelming majority of the parsing
time, around 140 seconds (the total time is somewhere around 145-150
seconds) is spent in the above mentioned function
org.apache.xerces.impl.xs.XMLSchemaValidator$ValueStoreBase.contains().

Suggested in the second screenshot is that the ValueStoreBase uses a
Vector to check uniqueness of id values. Given that this will cause
quadratic time behaviour, it is no wonder that so much time is wasted!

Is there a way to replace this with a more time-efficient implementation,
short of disabling validation completely? I tried doing the latter, and
then the entire file is parsed and processed in just a few seconds.

(can you Cc any copies to me please, since I did not subscribe to this
list; the instructions at http://xerces.apache.org/xerces2-j/jira.html
don¹t say that this is required)

Thanks,
-Olaf.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
profile1.png (image/png, 315.4 KB) - not displayed
Profile2.png (image/png, 51.8 KB) - not displayed