Bug 307544 - PDF Thumbnails are created very slowly in Okular Active
Summary: PDF Thumbnails are created very slowly in Okular Active
Status: RESOLVED FIXED
Alias: None
Product: Active
Classification: Plasma
Component: Applications (show other bugs)
Version: PA 3
Platform: unspecified Linux
: NOR normal
Target Milestone: unscheduled
Assignee: active
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 17:36 UTC by Thomas Pfeiffer
Modified: 2012-10-09 08:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Pfeiffer 2012-09-28 17:36:13 UTC
When I open a multipage PDF in Okular Active and use the drawer, I mostly get placeholder images and only very few thumbnails. Plus, the thumbnails seem to be created for pages in random order, making the whole grid look pretty odd. Even after a few minutes there are still only a few thumbnails.

It would be really helpful if the thumbnails could be created more quickly. Plus, they should be created starting form page 1 onward, so that the grid looks less weird

Reproducible: Always

Steps to Reproduce:
1. Open a PDF
2. Open the drawer
Comment 1 Aaron J. Seigo 2012-09-28 20:24:32 UTC
> It would be really helpful if the thumbnails could be created more quickly.

this may well be a Unicorn wish. 

it may be that with all the thumbnails being requested at once it causes a bottleneck, and it may well be better to request fewer pages to be rendered at a time. that may also help with the "starting from page 1 onwards" (though really that needs to be "starting from the first thumbnail visible onwards" otherwise if you are at page 200 you'll wait quiiiite a while for the thumbnails ;)

however, this may already be as good as it can get with a managed thread pool in the okular renderer, etc. it's also hard to know how good is good enough. "more quickly" is not a measurable goal :)
Comment 2 Thomas Pfeiffer 2012-09-28 21:33:39 UTC
You are absolutely correct. I wrote this bug report purely from a user's perspective and did not try to abstract from that and switch to a UX professional's perspective, sorry about that.

The problem we're facing here is not that something needs time, it is how the user _perceives_ it. When I open the drawer, I see a grid with mostly placeholders and a few thumbnails scattered here and there. I don't _see_ that the system is still working to create more thumbnails, it just looks broken (look at it again yourself, you'll notice it).
So if it is not possible to create the thumbnails faster, we need to convey to the user "Okay, these are the pages of your document. Normally I would present thumbnails of them to you, but I'm still busy creating them". This is not conveyed by the current UI. Currently a user thinks "Hey, why do some pages look like the real ones, but most others like placeholders?"

The actual rendering in the main view does a better job here: It starts with a blurry image of the page which is gradually sharpened as the details are rendered. Since I know that my document isn't really all blurry, I understand that the rendering is still at work.
So how long would it take to create a very blurry thumbnail (just sharp enough that not all pages look _exactly_ the same to users)? If that is quicker, than I'd suggest rendering very blurry thumbnails at first and then gradfually replacing them with sharper ones. I bet users will hardly notice what's happening.
If that would take almost as long as it takes to create the current ones, we need a different solution.

Actually, I'd say the thumbnail for the currently viewed page should be rendered first. This is not the case right now and it looks extremely weird when I see the crystal clear page before me in the main view but when I open the drawer, that same page is still a placeholder. Users don't understand that rendering the main view and rendering the thumbnail are independent processes, and it just looks totally broken.
Genereally I'd expect the thumbnails to be rendered as fast as the main view, so when I look at each page long enough to be fully rendered, its thumbnail should be there as well. Again, this is currently not the case. It takes longer to render thumbnails for X pages than it takes to render the actual pages.

So here is a measurable time for the rendering of a thumbnail: At maximum as long as it takes to render the page in the main view.

(Sorry for the very long comment. I just realized that this is actually a pretty delicate UX task.)
Comment 3 Aaron J. Seigo 2012-09-30 13:21:53 UTC
awesome comment; i really, really appreciate the time, though and insight offered.

i've looked at the code a bit today and have some ideas on how to hopefully improve things. will keep this report updated as that happens.
Comment 4 Thomas Pfeiffer 2012-09-30 17:56:47 UTC
I'm glad you appreciate my long comment :) I realize that this is how I should always write about UX issues. Experiencing a product from an actual user's perspective is great for spotting issues, but when it comes to describing them to developers / designers, I should always switch to the UX professional's perspective, so that I can provide you guys with more helpful input than just "I don't like this!".

Back to the original topic: I just realized that the rendering speed of the thumbnails varies geatly between different PDFs and between different pages within a PDF. In one PDF, the thumbnails were rendered almost as quickly as I scrolled through the pages. In another one, they were redendered really really slowly. In a third one, some thumbnails were created almost instantly, whereas others took literally minutes to render.
It seems that images on a page seem to slow down the process, but even if they have the same size, some images delay the thumbnail rendering by only a few seconds, others by minutes.
Comment 5 Thomas Pfeiffer 2012-10-09 08:36:34 UTC
Thumbnail creation feels lightning-fast now compared to before and no thumbnails are missing, great improvement!