[Okular-devel] [Bug 209592] New: Some random ideas for smoother, faster rendering

Benoît Jacob jacob.benoit.1 at gmail.com
Tue Oct 6 04:44:36 CEST 2009


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

           Summary: Some random ideas for smoother, faster rendering
           Product: okular
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: unspecified
            Status: NEW
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: okular-devel at kde.org
        ReportedBy: jacob.benoit.1 at gmail.com


Version:            (using Devel)
Installed from:    Compiled sources

Hi,

Here are 3 directions to explore to make the user experience smoother,
especially at high zoom levels.

1) Find out why it's slower than XPDF.

The speed in rendering difference becomes more obvious at high zoom levels (try
400%).

XPDF uses Poppler-Splash, like Okular, so i'm really puzzled that it is faster!
However, I really tried carefully, and I'm sure that it is at least here on my
system... I built everything with default options; anyway both XPDF and Okular
are using the same poppler.

In Callgrind, it does seem that both Okular and XPDF spend most time in
Poppler-Splash rendering.
- XPDF spends most of its time in Page::displaySlice in xpdf itself.
- Okular spends most of its time Page::displaySlice in libpoppler.

Just a wild idea: could it be the fact that Okular displays "fuzzy" previews
and it's actually consuming more CPU than expected?

2) At high zoom levels, when adjusting the zoom level, Okular first draws a
white page, "erasing" the previously rendered page, before rendering the actual
result. This seems useless, and distracting.

This is very strange:
I'm at 200% zoom level.
I zoom up   to 250%. Good: no white page rendered.
I zoom up   to 300%. Good: no white page rendered.
I zoom up   to 350%. BAD:  WHITE PAGE RENDERED
I zoom down to 300%. BAD:  WHITE PAGE RENDERED
I zoom down to 250%. BAD:  WHITE PAGE RENDERED
I zoom down to 200%. Good: no white page rendered.

3) A useful "cheat" to give the user a great speed impression, is that as soon
as he has changed the zoom level, you display an instant preview by just
scaling the existing image (the currently displayed page). This doesn't take
any significant time and has a surprising effect on the user experience. The
user is willing to forgive the not-quite-good quality of the preview because he
knows it's temporary and he doesn't have time to look at it carefully anyway.
That is also useful as it allows to know right away where the text will appear
(useful at high zoom level).

I implemented that in the Mandelbrot wallpaper plugin, as you can check. The
code (very generic actually) is there:

http://websvn.kde.org/trunk/KDE/kdeplasma-addons/wallpapers/mandelbrot/mandelbrot.cpp?view=markup

See the zoomView() method.

If you want, and if you can show me where and how I plug that into Okular, I
volunteer to implement that.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Okular-devel mailing list