[Okular-devel] [okular] [Bug 359932] Okular is very slow at opening some EPUB's

Guillaume Maudoux via KDE Bugzilla (layus) bugzilla_noreply at kde.org
Mon Mar 7 13:54:57 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=359932

--- Comment #11 from Guillaume Maudoux (layus) <layus.on at gmail.com> ---
Investigations show that okular spends a lot of time in the convert() method.
That step produces a QTextDocument from the epub content.
More specifically, it spends a lot of time in _cursor->insertHtml() called once
for each chapter of the epub, and an equal amount of time in
_cursor->insertText() used very stupidly by the algorithm to force a page
break.

Also, the console output shows that okular repaints all the pages on every
redraw, which causes that other 50% of the load time, and causes lag during
scrolling.
I have attached a first patch to remove the dumb insertion of newline
characters to force a new page.
The patch also tries to group cursor operations. That being said, my patch does
not seem to have that much effect on the load time.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list