Bug 561612 - Scrolling source does not update line numbers
Summary: Scrolling source does not update line numbers
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-31 09:36 EDT by trampas CLA
Modified: 2020-11-07 21:45 EST (History)
2 users (show)

See Also:


Attachments
source and line numbers temporarily out of sync (18.46 KB, image/png)
2020-04-03 21:06 EDT, Jonah Graham CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description trampas CLA 2020-03-31 09:36:31 EDT
When scro
Comment 1 trampas CLA 2020-03-31 09:37:40 EDT
When scrolling source file using scroll bars the line numbers lag so bad you will miss the line number you are searching for. 

I have noticed this in the CDT editor and assume it is not unique to CDT.
Comment 2 Jonah Graham CLA 2020-04-03 21:06:53 EDT
Created attachment 282335 [details]
source and line numbers temporarily out of sync

Hi Trampas, Thanks for the bug report. I have been able to reproduce this, although my machine may be a little fast as I can only see a problem if I take a screen recording and examine adjacent frames. I used screentogif[1] at 60Hz and I can see places where a single frame has line number and comment mismatched. It takes between 15 and 30ms approx for the line numbers to catch up - I guess you are seeing a longer time to catch up if you are noticing the slowness. I have attached a frame showing the misalignment with Eclipse 4.15 and the plain text editor.


[1] https://www.screentogif.com/
Comment 3 trampas CLA 2020-05-21 15:18:39 EDT
My machine is a Rzyen 7 with 8 cores, GTX 1050TI, 32GB ram, 1TB SDD. So I do not consider it slow, but I am using a 4k Screen with display scaling at 125%

here is a video of what I see, it is worse on large files. 

https://photos.app.goo.gl/omZKT9Z3Uz4nzxdd7
Comment 4 Farrell Farahbod CLA 2020-11-07 21:45:22 EST
This type of problem also happens when scrolling by scrollwheel / touchpad / touchscreen. It also seems to be unrelated to source code complexity. It is less severe (but still noticeable) even with a simple .txt file.

For anyone unable to duplicate this problem: if you use a "traditional" scroll wheel (where one notch of the wheel scrolls by an entire line or more) this problem is hard to see. Try scrolling with a modern touchpad, or touchscreen, or a mouse with a high-resolution scroll wheel (like some Logitech mice.) This will let you scroll by a few *pixels* at a time, and it becomes blindingly obvious that the line numbers lag behind the text.

Is there a reason for why the rendering of line numbers and rendering of text lag by even a millisecond? I would have expected the rendering code for those regions to be called sequentially.