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 "Chris Simmons (JIRA)" <xe...@xml.apache.org> on 2012/09/12 13:18:07 UTC

[jira] [Updated] (XERCESJ-1449) Validation of schema type unions are relatively slow due to use of exceptions.

     [ https://issues.apache.org/jira/browse/XERCESJ-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Simmons updated XERCESJ-1449:
-----------------------------------

    Description: 
I'll shortly attach some example code which shows that validating

2010-01-01T00:00:00.000Z

against the union (date, dateTime) is slower by a factor of three than validating against (dateTime, date).
This appears to be because if validation fails against the first member of the union then an exception is thrown.

It would therefore be quicker to change the simple type validation to allow an error handler of some sort to be passed in so that union types will not have to use exception handling when validating.

  was:
I'll shortly attach some example code which shows that validating

2010-01-01T00:00:00.000Z

against the union (date, dateTime) is slower by a factor of three than validating against (dateTime, date).
This appears to be because if validation fails against the first member of the union then an exception is thrown.

It would therefor be quicker to change the simple type validation to allow an error handler of some sort to be passed in so that union types will not have to use exception handling when validating.

    
> Validation of schema type unions are relatively slow due to use of exceptions.
> ------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1449
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1449
>             Project: Xerces2-J
>          Issue Type: Improvement
>          Components: XML Schema 1.0 Datatypes
>            Reporter: Chris Simmons
>         Attachments: XercesUnionPerformance.zip
>
>
> I'll shortly attach some example code which shows that validating
> 2010-01-01T00:00:00.000Z
> against the union (date, dateTime) is slower by a factor of three than validating against (dateTime, date).
> This appears to be because if validation fails against the first member of the union then an exception is thrown.
> It would therefore be quicker to change the simple type validation to allow an error handler of some sort to be passed in so that union types will not have to use exception handling when validating.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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