[Okular-devel] PDF thumbnail plugin

Pino Toscano pino at kde.org
Wed Jun 10 16:31:26 CEST 2009


Hi Peter,

> I had a short look on the bug https://bugs.kde.org/show_bug.cgi?id=190600
> (= "Hovering large PDFs slows down KDE"). When hovering a PDF in e. g.
> Dolphin, a preview of the PDF will be generated by using KDE's thumbnail
> mechanism.
>
> The corresponding thumbnail plugin that seems to have problems with huge
> PDFs is located at kdegraphics/thumbnailers/gscreator.cpp

That thumbnailer invokes `gs` (ghostscript) to get the image of the first page 
of the PS/PDF document (and coverting DVI files to PS, first). Do you get 
similar blocks/slowdowns if running `gs somebig.pdf` on command line?

> I did not have a
> look how Okular generates the thumbnails for PDF pages, but I was wondering
> whether this code could also be moved to the PDF thumbnailer to solve the
> issue mentioned above...

Okular uses the Poppler library for PDF documents. Most probably it could be 
done an own PDF thumbnailer which just uses Poppler for thumbnails (should be 
like 10 lines or so), but would be interesting to know whether the problem is 
actually just ghostscript crawling with very big documents, or the documents 
themselves are "heavy".
What is missing is also the indication of the actual "slowness", ie if KDE 4 
becomes slow because the CPU is very busy in rendering complex documents (in 
which case, even Poppler could give the same problems), or there's too much 
I/O job, or RAM usage, etc.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/okular-devel/attachments/20090610/daf23599/attachment.sig 


More information about the Okular-devel mailing list