Discussion:
D16519: Don't call scrollTo every time there's a mouseMoveEvent, use a timer instead
kezi
2018-10-29 20:11:46 UTC
Permalink
kezik created this revision.
kezik added a reviewer: Okular.
kezik added a project: Okular.
Herald added a subscriber: okular-devel.
kezik requested review of this revision.

REVISION SUMMARY
BUG: 399208

A workaround to the fact that on some hardware configurations with a wacom tablet (or, in general, an input device that generates a lot of events), okular accumulates several second of input latency

The timer is hardcoded to run at 60 fps, maybe that's not elegant

I see that there's similar functionality in a pair of other places, but I wasn't able to recycle the code efficiently

I tested this on a weak celeron n3450 laptop with no performance drawbacks
I don't notice any additional stuttering or lag on my powerful desktop

REPOSITORY
R223 Okular

REVISION DETAIL
https://phabricator.kde.org/D16519

AFFECTED FILES
ui/pageview.cpp
ui/pageview.h

To: kezik, #okular
Cc: okular-devel, #okular, ngraham, aacid
kezi
2018-10-30 12:26:26 UTC
Permalink
kezik updated this revision to Diff 44486.
kezik added a comment.


Waste less cpu cycles

REPOSITORY
R223 Okular

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D16519?vs=44462&id=44486

REVISION DETAIL
https://phabricator.kde.org/D16519

AFFECTED FILES
ui/pageview.cpp
ui/pageview.h

To: kezik, #okular
Cc: okular-devel, #okular, ngraham, aacid
kezi
2018-11-04 17:19:27 UTC
Permalink
kezik added a comment.


hello?

REPOSITORY
R223 Okular

REVISION DETAIL
https://phabricator.kde.org/D16519

To: kezik, #okular
Cc: okular-devel, #okular, ngraham, aacid
Albert Astals Cid
2018-11-07 21:53:41 UTC
Permalink
aacid added a comment.


Using timers doesn't seem like a good idea to me.

How much events do you get? What's the delta of each event?

REPOSITORY
R223 Okular

REVISION DETAIL
https://phabricator.kde.org/D16519

To: kezik, #okular
Cc: aacid, okular-devel, #okular, ngraham

Loading...