Bug 156892 - PDF are painfully very slow after changing colors for accessibility
Summary: PDF are painfully very slow after changing colors for accessibility
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-29 02:50 UTC by Mohd Asif Ali Rizwaan
Modified: 2011-12-20 19:01 UTC (History)
3 users (show)

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 Mohd Asif Ali Rizwaan 2008-01-29 02:50:11 UTC
Version:           0.6.80 (using 4.00.80 (KDE 4.0.80 >= 20080104), 'Frugalware)
Compiler:          gcc
OS:                Linux (i686) release 2.6.23-fw6

I like to Black background with Green Text in the foreground in okular. But the scrolling and repainting has become so slow after changing accessibility colors.

without changing colors scrolling etc. is fast but changed colors are slowing okular's performance.
Comment 1 Pino Toscano 2008-02-13 15:19:12 UTC
I cannot reproduce the "painfully slowness" when activating the accessibility settings.
Oh, and we even state in the configuration "These options can *badly* affect drawing speed" [emphasis by me].
Comment 2 Brad Hards 2008-12-01 02:42:59 UTC
We could probably get a marginal improvement using Blitz::invert for the invert colours choice.
--- okular/ui/pagepainter.cpp   (revision 891032)
+++ okular/ui/pagepainter.cpp   (working copy)
@@ -252,8 +252,8 @@
             switch ( Okular::Settings::renderMode() )
             {
                 case Okular::Settings::EnumRenderMode::Inverted:
-                    // Invert image pixels using QImage internal function
-                    backImage.invertPixels(QImage::InvertRgb);
+                    // Invert pixels using Blitz RGB version
+                    Blitz::invert( backImage );
                     break;
                 case Okular::Settings::EnumRenderMode::Recolor:
                     // Recolor image using Blitz::flatten with dither:0

Mohd: Can you provide more information on which combination(s) of settings causes you problems, and the extent of the slow-down ("painful" is a bit to subjective to fix). Please specify exactly which settings you are using, and roughly how much slower it makes compared to the default settings.

It would also be useful to know which version of Qt you are using.
Comment 3 Brad Hards 2009-01-04 11:59:44 UTC
Mohd: Can you please respond to the questions identified in comment #2?
Comment 4 Igor Cappello 2009-10-22 14:49:43 UTC
I am in a similar situation: without inverted colors, scrolling is smooth. As soon as inverted colors are activated (white text on black background), scrolling and changing pages happen after a lag of about 1-2 seconds.

My environment:
kernel 2.6.31 (patched by gentoo)
xorg-server 1.6.3.901-2
qt 4.5.2
kde 4.3.2
okular settings: color mode "invert colors". Other settings seem to be unrelated.

The lag seems directly linked to the used zoom level (more zoom -> more lag).

In the same environment, the same document opened with kpdf (kde 3.5.10) scrolls with no lag at all.

If other information is needed, just ask.

regards,
Igor
Comment 5 Igor Cappello 2010-02-24 13:49:24 UTC
--Status update--

qt-4.6.2, using the raster engine
kde-4.4

Delays are no more present, even when zooming.

regards,
Igor
Comment 6 Davor Cubranic 2011-06-19 06:12:29 UTC
This bug has been quiet in a while, and Igor couldn't reproduce it over a year ago. Is this
still an issue for the original commiter? If not, we can close the bug.
Comment 7 jordonwii 2011-12-20 02:47:50 UTC
I was unable to reproduce on Kubuntu 11.10, KDE 4.7.1.
Comment 8 Albert Astals Cid 2011-12-20 19:01:08 UTC
Marking as resolved, please reopen if you can still reproduce it