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

Allow for quicker loading when ony interested in metadata #123

Merged
merged 1 commit into from Mar 10, 2018

Conversation

Projects
None yet
2 participants
@poire-z
Contributor

poire-z commented Mar 10, 2018

This adds an optional parameter to LoadDocument(), that will be used only by coverbrowser plugin for metadata and cover extraction (so extracting metadata from a big book can take 3s instead of 120s).
It will return early when metadata are obtained, and avoid the full document loading (XML parsing, DOM tree building).
Only implemented for EPUB for now (HTML needs XML parsing, and I don't really know much about the other formats).
Will need small mods to cre.cpp and credocument.lua to pass up this parameter.

Allow for quicker loading when interested in metadata only
This adds an optional parameter to LoadDocument, that will be used
only by coverbrowser plugin for metadata extraction.
It will return early when metadata are obtained, and avoid
the full document loading (XML parsing, DOM tree building).
Only implemented for EPUB for now.
@Frenzie

This comment has been minimized.

Show comment
Hide comment
@Frenzie

Frenzie Mar 10, 2018

Member

Looks okay. No easy way to easily separate out metadata into a separate function or something like that?

Member

Frenzie commented Mar 10, 2018

Looks okay. No easy way to easily separate out metadata into a separate function or something like that?

@poire-z

This comment has been minimized.

Show comment
Hide comment
@poire-z

poire-z Mar 10, 2018

Contributor

Not really. They are gathered as part of the whole document loading, different for each format, and not really early. We can just decide to return as soon as we know we have all that we need.

Contributor

poire-z commented Mar 10, 2018

Not really. They are gathered as part of the whole document loading, different for each format, and not really early. We can just decide to return as soon as we know we have all that we need.

@poire-z poire-z merged commit 4771fe0 into koreader:master Mar 10, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@poire-z poire-z deleted the poire-z:metadataOnly branch Mar 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment