Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321020

Summary: Cocoa 3.6 scrolls faster than Cocoa 3.5, but slower than Carbon 3.5
Product: [Eclipse Project] Platform Reporter: Kevin Conner <connerk>
Component: SWTAssignee: Project Inbox <swt-triaged>
Status: CLOSED DUPLICATE QA Contact: Scott Kovatch <skovatch>
Severity: normal    
Priority: P3 CC: eclipse, lshanmug, lucaspick, skovatch
Version: 4.0   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Kevin Conner CLA 2010-07-27 10:11:10 EDT
Build Identifier: 20100617-1415 and I20100720-0800

Using both the current 3.6 Java developer release (20100617-1415) and the latest integration build (I20100720-0800), I can't get the editor to scroll nearly as fast as it does in 3.5 Carbon.

Bug 282229 addressed a problem in 3.5 Cocoa, and these two 3.6 Cocoa builds appear faster than what I remember about 3.5 Cocoa, so I don't think it regressed.  But, 3.6 Cocoa is still substantially slower than 3.5 Carbon.

The 3.5 Carbon release I am using is 20100218-1602, 32-bit, updated as of today, 7/27/2010.  The 3.6 builds are both 64-bit.

My OS is Snow Leopard 10.6.4.  I'm on a MacBook Pro at 2.26GHz Core 2 Duo, 4GB memory.  In System Preferences under Keyboard, my Key Repeat Rate slider is all the way to the right ("fast").

Reproducible: Always

Steps to Reproduce:
Do this test once for Carbon and once for Cocoa.

1. Pick any Java class that's multiple pages in length.  Put the insertion point at the beginning of the file.
2. Hold the down arrow to scroll down.
3. Observe that it keeps up with the key repeat rate as the insertion point moves down the screen.
4. When the insertion point reaches the bottom and the editor begins to scroll line-by-line, observe that Carbon keeps the same speed, whereas Cocoa goes slower.

The test demonstrates that Carbon can refresh the screen at least as fast as the key repeat rate, and Cocoa cannot.  The test might show a false negative if your key repeat rate is not set high enough, or if your machine is just fast enough to make up the difference.  You might put some kind of timing into the draw routines, and that would be a more robust test.
Comment 1 Scott Kovatch CLA 2010-07-27 12:28:47 EDT
I'll have to try 3.5 Carbon, but on my MacBook Pro, 3.6 Cocoa 32 and 64 bit are dramatically faster in scrolling than 3.6 Carbon. I'm using Inconsolata 14 for my font. My 32-bit Cocoa also has a fix for bug 320135, but that will help things like line numbers and whitespace symbols.
Comment 2 Kevin Conner CLA 2010-07-29 15:52:57 EDT
Can you recommend a particular build ID I should try and get?

I'm using Inconsolata, size 16.  I also use light text on a dark background.
Comment 3 Scott Kovatch CLA 2010-07-29 16:14:02 EDT
The last I-build (http://download.eclipse.org/eclipse/downloads/drops/I20100727-0800/index.php) will have the change I made for caching FontMetrics. I fixed it on 7/21. My 64-bit version is unchanged from the 3.6 GM build.
Comment 4 Kevin Conner CLA 2010-07-29 17:16:14 EDT
I tried I20100727-0800 in Carbon and in Cocoa-64.  Cocoa-64 was faster than Carbon.  But the Carbon build of 20100218-1602 (3.5 SR2) was faster still than both of them.

I tried my test in the plain text editor and I had the same results as in the Java editor.
Comment 5 Ben Spink CLA 2012-08-15 03:53:51 EDT
How many years will this bug take to fix?

Prior bugs for the same issue have been closed off as having been fixed, but this bug is definitely not fixed.

Downloaded latest Eclispe 4.2 from website today, scrolling was so bad I promptly put it into the trash and went back to my Carbon eclipse.

I have 140 lines visible on my 30" rotated 1600x2560 monitor.

Carbon: 422 line Java file.  16 seconds to scroll.  140 lines visible.
Carbon: 422 line Java file.  18 seconds to scroll.  160 lines visible.
XCode:  422 line Java file.  17 seconds to scroll.  160 lines visible.

Cocoa:  422 line Java file.  47 seconds to scroll.  140 lines visible.
Cocoa:  422 line Java file.  51 seconds to scroll.  160 lines visible.
Cocoa:  422 line Java file.  34 seconds to scroll.  20 lines visible.

Those numbers don't fully quantify it.  When using it with a mouse wheel to scroll quickly in a document looking for something specific...you can't.  The refresh rate is so slow that you just get random chunks displaying as you scroll with no fluid motion at all.  My mouse wheel movements can be seconds ahead fo the screen refreshes where I just sit and wait for it to catch up.  Its just not usable under any circumstance.  So if you are sitting there on your 13" laptop with 40 lines visible in your editor...well, you may not notice this as much.  (I would still.)  But if you are trying to really code and need speed, its just impossible to use Cocoa Eclipse.  I have tried each release over the years and figured that surely this would be fixed by now.  I was wrong.

iMac 3.2Ghz Quad i7 OSX 10.8 (issue existed on 10.6, and 10.7)
Comment 6 Ben Spink CLA 2012-08-15 03:59:50 EDT
Forgot to give my current build: 4.2 I20120608-1400
Comment 7 Lucas Pick CLA 2013-06-26 12:03:01 EDT
It is slow on my large screen and extremely annoying.
Comment 8 Lakshmi P Shanmugam CLA 2017-07-03 02:53:50 EDT

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