-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept multiple EPUBs as input #664
Comments
I think my answer to 665 ought to solve your problem here as well |
@JSCrawford54 your answer to #665 doesn't really solve the problem of avoiding the JVM startup time. @elmimmo for now the only way to do it is programmatically, via EpubCheck's Java API. Allowing batch validation in the CLI is certainly a nice idea, but I can't promise anything as it's not a top prio! |
PullRequests are always welcome 😃 |
Possible solutions to reduce the library load overhead and JVM startup time are Drip or Nailgun, but in order to load libraries and call epubcheck on the command the jar files all have to be loaded in the classpath. Then, the class com.adobe.epubcheck.tool.Checker must be called explicitly. Using both Drip and Nailgun, I get the same SAXParseException error on a file that validates just fine loading the JAR file on the command line. org.xml.sax.SAXParseException; systemId: jar:file:/app-lib/epubcheck-4.0.2/epubcheck.jar!/com/adobe/epubcheck/schema/20/rng/container.rng; lineNumber: 4; columnNumber: 71; root element of schema must have a namespace I'm also asking this question on StackOverflow, but since this is the group with the best knowledge of epubcheck, I thought I'd ask here too. |
Ack. It would appear that I have multiple SAX libraries on the system, one in the main system library and a different one within the "lib" directory of epubcheck. Changing my classpath for either Drip or Nailgun removes the error. Note, however, than Drip does not effectively reduce the library-load overhead because it can't minimize the number of libraries that are loaded (which is what its documentation seems to say it does to optimize start-up time for java processes.) Nailgun, however, speeds up epubcheck from 5-6s on the first epub to 0.8-1.2s on the second and subsequent checks. (The first epubcheck run actually loads the libraries into the Nailgun JVM, but you have to check an epub, an empty run won't work.) |
For future reference: https://stackoverflow.com/questions/49804608/running-epubcheck-inside-nailgun-or-drip |
Considering the high cost of starting and closing the JVM, it would be convenient that epubcheck accepted multiple EPUBs in its input. I bet that, right now, a disproportionate amount of time and resources are wasted on initiating the JVM and doing away with it when batch-checking lots of EPUBs.
The text was updated successfully, but these errors were encountered: