Bug 209680

Summary: Okular hitting big latency issue in Qt/GLib event loop
Product: [Applications] okular Reporter: Benoît Jacob <jacob.benoit.1>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: aacid
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Benoît Jacob 2009-10-06 22:45:18 UTC
Version:            (using Devel)
Compiler:          GCC 4.4 
OS:                Linux
Installed from:    Compiled sources

When you click "Zoom In" in the toolbar, you'd expect PageView::slotZoomIn() to be called instantly.

To check, edit okular/ui/pageview.cpp and edit slotZoomIn to look like this,

void PageView::slotZoomIn()
{
    cout << "slotZoomIn" << endl;
    updateZoom( ZoomIn );
}

Now open any PDF document (doesn't seem doc-specific, but didn't try with non-PDF).

Zoom to 150%.

Now hit "Zoom In" in the toolbar and check the console output. There's a noticeable delay until "slotZoomIn" gets printed in the console.

This gets worse as the zoom factor increases, HOWEVER when the zoom factor is big enough to trigger the "blank white page rendered" effect (see https://bugs.kde.org/show_bug.cgi?id=209630), then suddenly the latency disappears and slotZoomIn is called instantly!

During the latency, notice that the Qt UI is frozen. Indeed, with Oxygen style, the glow on the Zoom In toolbar button stays glowing during this latency, it doesn't get back to normal instantly as it should.

This is on openSUSE 11.2. Albert was able to confirm the latency on his machine.

This doesn't seem to be affected by setting QT_NO_GLIB=1.

In a debugger, all I can see is normal event loop business with a lot of mutex locking going around.
Comment 1 Albert Astals Cid 2012-08-08 21:15:58 UTC
Hi, can you still reproduce this issue? It seems to work fine for me
Comment 2 Albert Astals Cid 2012-11-14 14:14:51 UTC
No answer in 3 months, I'll assume it's fixed, please reopen if you can still reproduce