Bug 563929

Summary: Text selection performance problem when scrolling is involved
Product: [Eclipse Project] Platform Reporter: Juergen Baier <baier>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: loskutov, twolf
Version: 4.10   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Juergen Baier CLA 2020-06-04 09:14:22 EDT
I have a Java file with 216 lines.

- I put the cursor in the first line
- Select the line by pressing <shift><cursor-down>
- Then I keep pressing <cursor-down> until the end of the file is reached (so that the lines below are selected too)

=> This takes about 18 seconds on my computer

Code minings (method parameter names) are turned on. But even without this the performance is still not very good.

Interesting: The selection runs pretty fast at the beginning, but as soon as I reach the text editor view boundary (i.e. as soon as the editor needs to scroll) it starts running very slow.

I'm not sure if this should be considered a bug or a performance enhancement. Feel free to switch the severity.

I'm just saying a performance improvement in this area would be highly user-visible and would make many users happy :-)
Comment 1 Noopur Gupta CLA 2020-06-05 03:46:51 EDT
Which Eclipse version are you using? See also bug 366471.
Comment 2 Juergen Baier CLA 2020-06-05 03:49:24 EDT
I'm using 4.15.0 on macOS Catalina on "MacBook Pro (15-inch, 2017)".
Comment 3 Thomas Wolf CLA 2020-06-05 04:08:03 EDT
Can reproduce. Doesn't seem to be related to bug 366471. Occurs only when the selection is extended via the keyboard; selecting with the mouse (moving the mouse cursor below the bottom border of the view to keep extending the selection) is normally fast, and *much* faster than the keyboard method.

Also not a regression; it's similarly slow in Eclipse 2018-12. Not specific to Java files either, can also reproduce with a plain text file.