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

--- Comment #11 from Guillaume Maudoux (layus) <layus...@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 watching all bug changes.

Reply via email to