Closed awltr closed 4 years ago
You should reuse the Check instance. All scenario-stuff (xslt, schema etc.) is only read once on initialisation. E.g do this
Configuration config = Configuration.load(...).build();
Check check = new DefaultCheck(config); // all runtime artifacts are loaded here!
check.checkInput(yourInput1);
check.checkInput(yourInput2);
check.checkInput(yourInput3);
...
That's a good point. I could have really come up with that myself :). Thanks!
If you use the project as API, the scenarios and all xslt are read in at each validation. This is very costly in terms of performance. Would it be possible to implement a caching? I could also do a PR for it.