Skip to content
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

Open
elmimmo opened this issue Dec 17, 2015 · 6 comments
Open

Accept multiple EPUBs as input #664

elmimmo opened this issue Dec 17, 2015 · 6 comments
Labels
type: improvement The issue suggests an improvement of an existing feature

Comments

@elmimmo
Copy link

elmimmo commented Dec 17, 2015

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.

@tofi86 tofi86 added the type: improvement The issue suggests an improvement of an existing feature label Dec 17, 2015
@JSCrawford54
Copy link

I think my answer to 665 ought to solve your problem here as well

@rdeltour
Copy link
Member

@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!

@tofi86
Copy link
Collaborator

tofi86 commented Dec 17, 2015

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 😃

@angwe
Copy link

angwe commented Apr 12, 2018

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.

@angwe
Copy link

angwe commented Apr 17, 2018

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

@tofi86
Copy link
Collaborator

tofi86 commented Feb 27, 2019

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.

For future reference: https://stackoverflow.com/questions/49804608/running-epubcheck-inside-nailgun-or-drip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement The issue suggests an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants