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

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

    Attachment: XercesUnionPerformance.zip

This is a simple performance harness (eclipse project zip).  Typical output of 
the main method's second pass is as follows:-

string took 146
dateTime took 242
dateOrDateTime took 1013
dateTimeOrDate took 321

The names refer to schema types or unions.  Note that dateOrDateTime is about 
3* slower.

> 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 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to