SUMMARY Okular never stumbles during scrolling through pdf documents. It may temporary show a blank page but allows you to scroll pages further smoothly. Okular jerks and stumbles while scrolling through a heavy epub or fb2 document (perhaps other types of documents too). It is very unpleasant experience. As far as I can tell it happens even on decent contemporary hardware which, without a doubt, should allow to scroll through a 2.5MB ~1500 pages document smoothly. STEPS TO REPRODUCE I actually tried to read this book: https://rutracker.org/forum/viewtopic.php?t=5608295 I could attach it here but I'm not sure whether it would be a copyright issue or not. The way the smooth scrolling of Okular were interrupted by page loading irritated me so much that I ended up converting this book to pdf (using Calibre) and reading it in pdf form.
Yeah, the text generators are not threaded. There's a few #ifdef OKULAR_TEXTDOCUMENT_THREADED_RENDERING around the code but never enabled, i guess Pino didn't feel it was safe enough. Someone should find time to finish the feature
1) I don't understand how a plaintext document can be rendered so inefficiently. It takes time for Okular to do pagination of a book, which, AFAIK do not have a notion of a page (fb2, mobi), it's OK. But then it stumbles over each page! A page with about 40 rows of text on it. On my Acer C720 Okular freezes completely for about a second, then has about 3 seconds of considerably deteriorated performance. It doesn't take so much time to render a similar or even more complex pdf page. Only pdf pages with complex graphics take much time to render. 2) If a user was patient enough and slowly scrolled through some pages they become quickly accessible. Kind of "pre"-loaded. User can scroll smoothly back and forth in the range of these pages. So, maybe some kind of prefetch could be done to improve performance? Maybe even all book could be situated in RAM in a form suitable for rendering? Does it take too much RAM? By the way, Okular Settings [Configure Okular -> Performance -> Memory Usage] seem does nothing for non-pdf formats.
> I don't understand how a plaintext document can be rendered so inefficiently. I'm eagerly awaiting your patches that will make everything so much better.