Bug 434898 - [GTK3] vertical scrolling slow and lagging behind scrollwheel
Summary: [GTK3] vertical scrolling slow and lagging behind scrollwheel
Status: CLOSED DUPLICATE of bug 511596
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 major with 16 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: feep
: 438704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-14 15:51 EDT by Kris De Volder CLA
Modified: 2017-02-09 03:31 EST (History)
18 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kris De Volder CLA 2014-05-14 15:51:31 EDT
Scrolling editors or other text view up-down vertically is slow and severely lags.

When I scroll I see 'tears' in the text as it moves up/down (this is probably an effect of the slowness and how the scroll area is being updated. If you wait for the scrolling to finish it looks good again eventually.

What is most annoying though is that you actually do have to literally 'wait for scrolling to finish'.  When I use my mouse scrollwheel to quickly scroll up or down it can take several seconds before the text stops scrolling after I stop rolling the wheel.

Also I have the distinct impression scrolling is a lot slower than it used to be in eclipse with GTK2. (I.e it seems to take much longer to scroll past the same amount text).
Comment 1 Mickael Istria CLA 2014-07-02 05:33:23 EDT
*** Bug 438704 has been marked as a duplicate of this bug. ***
Comment 2 Mickael Istria CLA 2014-07-02 05:34:09 EDT
This seems to affect only StyledText (Trees and other widgets seem to be working well).
Comment 3 Dani Megert CLA 2014-07-02 05:42:16 EDT
*** Bug 438704 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2014-07-02 05:43:28 EDT
(In reply to Kris De Volder from comment #0)
> Also I have the distinct impression scrolling is a lot slower than it used
> to be in eclipse with GTK2. (I.e it seems to take much longer to scroll past
> the same amount text).

Confirmed, see bug 438704 comment 6.
Comment 5 Alexander Kurtakov CLA 2014-07-14 13:59:43 EDT
Can we get a swt only reproducer?
Comment 6 Mickael Istria CLA 2014-07-15 08:18:27 EDT
For those wondering about GTK version:

$ dpkg -l libgtk-3-0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  libgtk-3-0     3.4.2-0ubuntu0 GTK+ graphical user interface library
Comment 7 Mickael Istria CLA 2014-07-15 13:05:00 EDT
I've tried to setup a reproducer with a StyledText using same style as editors ( SWT.MULTI | SWT.HORIZONTAL | SWT.VERTICAL | SWT.FULL_SELECTION | SWT.NO_REDRAW_RESIZE | SWT.LEFT_TO_RIGHT ). The StyledText contain a new StyleRange every 100 characters, with different color/font/fontstyle. Text is the code of Platform.java.
I couldn't reproduce the issue.

I suspect this is an issue with layouts.

An interesting experiment:
* Take an Eclipse that is affected by this bug.
* Open a large file
* Scroll down, see the speed (I see ~15 lines down everytime StyledText is updated
* Now move the editor to a dedicated window, out of main workbench Window
* Retry with editor detached from main window.
* See, everything is better. Scroll is reactive.

@Kris: can you confirm you notice the difference too?
Comment 8 Kris De Volder CLA 2014-07-16 13:01:25 EDT
> @Kris: can you confirm you notice the difference too?

No, I see the same behavior in the detached window.

What I do exactly: I have a mouse with scrollwheel attached. I gather this is an excellent 'tool' to produce this behavior because rolling the wheel generates lots of UI events in short time.

Open any file in the editor, roll the wheel rapidly up-down-up-down-...
Do this for a little while (the longer you do it the more apparant the problem will be as the 'lag' increases). I see the window is scrolling up-down-up-down-....

I stop rolling the scroll-wheel...

The window just keeps on scrolling up-down-up-down-... for some time after.

I am getting this behavior in the detached window just the same as in the one in the regular workbench.

It doesn't require a large file, it seems any file will do, as long as its large enough to be able to scroll.

I am only getting this 'lag' with GTK3.
Comment 9 Ethan Je CLA 2015-03-26 15:36:08 EDT
I started experiencing this issue after updating my Linux kernel to 3.18.9. The fix was as simple as rebuilding my video card drivers.
Comment 10 J James CLA 2015-04-03 01:01:20 EDT
I second the behavior that Kris De Volder described on 2014-07-16. I am seeing that exact behavior on my machine, whenever I move the mouse wheel in the editor.

There is no problem scrolling in the Project Explorer, or any other View that I sporadically tested. No other Linux GUI application has this problem, either, so I suspect the problem is in Eclipse, and that it is not related to my video drivers.
Comment 11 Sergio Otero CLA 2015-04-30 02:55:03 EDT
With JVisualVM is was clear that the problem was in the function "org.eclipse.swt.internal.cairo.Cairo._cairo_paint[native]"

Going from Ubuntu 12.04 to 14.04.2 has solved the problem for me
Comment 12 Ivan Matavulj CLA 2016-06-23 03:33:10 EDT
I am still experiencing this problem with Eclipse Neon (v4.6.0) on Ubuntu 14.04.1.
Scrolling files using mouse wheel in Java editor is very sluggish. After I let go of the wheel, file keeps scrolling for another second.
I could get around this issue by adding these two lines to my eclipse.ini:

--launcher.GTK_version
2

However, after that all the nice icons next to drop down menu items were gone.
Comment 13 User One CLA 2016-07-21 05:43:13 EDT
The same issue for me. Eclipse 4.6, Ubuntu 14.04. The option "--launcher.GTK_version 2" didn't help.
Comment 14 User One CLA 2016-07-21 18:52:57 EDT
(In reply to Sergio Otero from comment #11)
> With JVisualVM is was clear that the problem was in the function
> "org.eclipse.swt.internal.cairo.Cairo._cairo_paint[native]"
> 
> Going from Ubuntu 12.04 to 14.04.2 has solved the problem for me

What version of GTK do you have installed? I have (latest available for 14.04) 'libgtk-3.10.8' and the problem is there.
Comment 15 User One CLA 2016-07-22 06:37:10 EDT
The option The option:
"--launcher.GTK_version
2"
helps if it added not to the end of 'ini' file.
Comment 16 James Blackburn CLA 2016-10-07 05:58:11 EDT
Also an issue with RHEL 7 / CentOS 7 with gtk3-3.8.8-10.el7.x86_64

Downgrading to 2 as suggested in the previous comment fixes the scrolling issue (but appears to break the internal browser).
Comment 17 Kris De Volder CLA 2016-10-08 13:42:55 EDT
Downgrading severity because GTK2 is a workaround?

Using GTK 2 is not a great workaround. I found it to be increasingly more glithcy in every successive release of Eclipse. On 4.6 I am now permantly switched to GTK 3 because of this.

The slow scrolling is relatively annoying but its the lesser evil because I now have a beefier laptop, which makes it less of a show-stopper.

But I pitty anyone trying to run Eclipse on linux on somewhat older hardware.
Comment 18 Dani Megert CLA 2017-02-09 03:31:27 EST

*** This bug has been marked as a duplicate of bug 511596 ***