[
https://issues.apache.org/jira/browse/XERCESJ-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414439#comment-13414439
]
Jorge L. Williams commented on XERCESJ-1573:
--------------------------------------------
Hi Mukul,
I totally understand that there's an overhead associated with assertions. I
want to point out some things though.
1. The instance document is really small:
<test xmlns="http://www.rackspace.com/test/simple"
start="2012-03-12T11:51:11Z" end="2012-03-13T11:51:11Z"/>
building the XDM tree should not be an expensive operation in terms of
memory or CPU.
2. If you look at the graph (d2.png) you'll note that for the first couple of
runs we're able to validate the instance doc with less than 10 Megs of memory
(similar to the non-assert case). As the runs progresses memory usage starts
increasing dramatically finally peaking at 120MB -- before I stopped the run
(couldn't get it to finish because it was going so slow). Performing garbage
collection did not improve the memory situation -- this tells me that there may
be a leak of some kind.
3. The behavior is more dramatic when you include more than one assertion in
the XSD. We are doing server side validation and memory usage quickly grows to
gigabytes of memory -- until the app eventually grinds to a halt. So in that
sense the bug *is* a complete blocker for us -- we can't use Xerces to validate
those XSDs.
4. The Saxon implementation validates the same XSD with minimal increases in
performance and memory usage.
5. I did a simple experiment where I, removed the assertion from the XSD,
created a DOM for the instance document, performed the XPath query (using
Saxon), then passed the doc to Xerces2 for validation I saw no issues in terms
of performance or memory usage.
> Possible memory leak when using assertions
> ------------------------------------------
>
> Key: XERCESJ-1573
> URL: https://issues.apache.org/jira/browse/XERCESJ-1573
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.1 Datatypes
> Affects Versions: 2.11.0
> Reporter: Jorge L. Williams
> Priority: Blocker
> Attachments: d1.png, d2.png, duration-sans-assert.xsd, duration.xsd,
> good.xml
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]