You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Jorge L. Williams (JIRA)" <xe...@xml.apache.org> on 2012/07/14 04:57:33 UTC

[jira] [Comment Edited] (XERCESJ-1573) Possible memory leak when using assertions

    [ https://issues.apache.org/jira/browse/XERCESJ-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414273#comment-13414273 ] 

Jorge L. Williams edited comment on XERCESJ-1573 at 7/14/12 2:55 AM:
---------------------------------------------------------------------

Been playing around with the latest 1.1 branch and I think I'm seeing a memory leak when an XSD uses assertions.

I'm including the following files:

duration.xsd :  A simple XSD with 1.1 assertions
duration-sans-assert.xsd:  Same XSD without assertions
good.xml : a valid instance document according to both XSDs

I'm also attaching screen shots of memory usage in jconsole when running SourceValidator to validate the instance document 1,000,000 times.  As the job was running I periodically pressed the "Perform GC" button.

With duration-sans-assert.xsd memory usage always returns back to about ~7-8MB.  With duration.xsd memory usage just keeps going up till it reaches somewhere about 120MB.

The performance differences between the two is not insignificant

I've noticed the same behavior in my own app.
                
      was (Author: jorgew):
    Been playing around with the latest 1.1 branch and I think I'm seeing a memory leak when an XSD uses assertions.

I'm including the following files:

duration.xsd :  A simple XSD with 1.1 assertions
duration-sans-assert.xsd:  Same XSD without assertions
good.xml : a valid instance document according to both XSDs

I'm also attaching screen shots of memory usage in jconsole when running SourceValidator to validate the instance document 1,000,000 times.  As the job was running I periodically pressed the "Perform GC" button.

With duration-sans-assert.xsd memory usage always returns back to about ~4MB.  With duration.xsd memory usage just keeps going up.

The performance differences between the two is not insignificant

I've noticed the same behavior in my own app.
                  
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org