stevedlawrence opened a new pull request, #1538: URL: https://github.com/apache/daffodil/pull/1538
The TDML runner caches DataProcessors with the default validation type. But at the beginning of every test, it calls withValidation again to whatever the test requires. Since Daffodil now builds validators immediately when withValidation is called, this means are building validators twice, once for the cached DataProcessor and once for the tests DataProcessor. And then the tests DataProcessor is no longer used so the validator it just built will be garbage collected after being used once. For expensive validators like Xerces, this can be a lot of wasted time and memory, especially since mosts tests in a suite use the same schema and validation mode. To avoid excessive creation of validators, this modifies the TDMLCompileResultCacheValue so it stores multiple DataProcessors in a Map, keyed off the validation type that led to its creation. This work is done when getting a compile result, so tests no longer need to know the validation mode and will never trigger additional validation work that is immediately discarded. DAFFODIL-2901 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
