[EPubGenerator] Avoid pointless scans of the whole document

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



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

R223 Okular
No Linters Available
No Unit Test Coverage
Build Status
Buildable 11426
Build 11444: arc lint + arc unit
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.