You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for this great wrapper around the Java schematron libraries. I was able to quickly set it up and validate schematron data against our XML documents.
But it's kind of slow to process each message and I traced the performance to launching the JVM in Schematron::Utils#execute_transform
2.52 seconds, 99.48% overall, just to fire up and run the transformation. My goal is to embed this in a Rails project and was wondering if it's possible to fire up the JVM when the Rails app starts and feed it all incoming requests to validate.
I'm not a Java expert, but am with Ruby and would be happy to code the PR necessary if its possible and some guidance offered on what has to change to make this work.
The text was updated successfully, but these errors were encountered:
I did a little research on Java to learn about optimizing JVM startup times.
This update is just to provide some more information on startup times. I'd still like to try to accomplish original request of one JVM for many calls.
With the default settings on this library, I get the following times running my schematron validation test:
real 0m2.367s
user 0m4.015s
sys 0m0.929s
By modifying #execute_transform to add -client and -dev flags (client fo linux, dev for osx), I greatly reduced start time as follows:
real 0m1.032s
user 0m1.390s
sys 0m0.257s
So even if not possible to start the JVM in the background and service multiple requests with one instance, we can definitely speed things up greatly for the quick one-off calls as used by the wrapper.
First, thanks for this great wrapper around the Java schematron libraries. I was able to quickly set it up and validate schematron data against our XML documents.
But it's kind of slow to process each message and I traced the performance to launching the JVM in Schematron::Utils#execute_transform
2.52 seconds, 99.48% overall, just to fire up and run the transformation. My goal is to embed this in a Rails project and was wondering if it's possible to fire up the JVM when the Rails app starts and feed it all incoming requests to validate.
I'm not a Java expert, but am with Ruby and would be happy to code the PR necessary if its possible and some guidance offered on what has to change to make this work.
The text was updated successfully, but these errors were encountered: