[EPubGenerator] Avoid pointless scans of the whole document
ClosedPublic

Authored by bruns on May 1 2019, 10:55 PM.

Details

Summary

The "<video></video>" tag is a placeholder, and should only be processed
when it has been inserted for this toc item, i.e. when movieAnnots is
non-empty. Also place the search cursor at the last inserted block,
otherwise the expression will search from the beginning of the document.

Do likewise for audio/soundActions.

This makes loading large documents much fasters, and even fixes crashing
on huge documents, e.g. from project Gutenberg "The Complete Works of
William Shakespeare" (3200 pages) or the "King James Bible" (1400 pages).

Test Plan

open a large EPub file (see above)

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.May 1 2019, 10:55 PM
Restricted Application added a project: Okular. · View Herald TranscriptMay 1 2019, 10:55 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
bruns requested review of this revision.May 1 2019, 10:55 PM
aacid accepted this revision.May 22 2019, 10:28 PM
aacid added a subscriber: aacid.

makes sense

This revision is now accepted and ready to land.May 22 2019, 10:28 PM
This revision was automatically updated to reflect the committed changes.