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

Bug 339311

Summary: [Progress] Every user-job causes a busy cursor to be shown for a minimum of 250ms
Product: [Eclipse Project] Platform Reporter: Prakash Rangaraj <prakash>
Component: UIAssignee: Prakash Rangaraj <prakash>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, daniel_megert, eclipse, jamesblackburn+eclipse, john.arthorne, mober.at+eclipse, mschorn.eclipse, prakash, wb-rel, yevshif
Version: 3.6   
Target Milestone: 3.6.2+   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on: 313899    
Bug Blocks:    

Description Prakash Rangaraj CLA 2011-03-08 23:58:49 EST
+++ This bug was initially created as a clone of Bug #313899 +++

When I run a user job ('job.setUser(true)') the UI shows a busy cursor for 250ms, even if the job does not do anything. This becomes apparent when I schedule 20 user-jobs that complete immediately, then the UI shows a busy-cursor for 5 seconds.

My expectation is, that the busy cursor is at the maximum shown as long as the job is actually running.


Here is a test-case:

public class UIJobTest extends TestCase {
	
	public void testUIJob() {
		int count= 20;
		
		assertTrue(runEventLoop() < 1000);
		for (int i=0; i<count; i++) {
			Job j= new Job("dummy") {
				@Override
				protected IStatus run(IProgressMonitor monitor) {
					return Status.OK_STATUS;
				}
			};
			j.setUser(true);
			j.schedule();
		}
		long time = runEventLoop();
		assertTrue("Main thread busy for " + time + 
                           " ms when runnning " + count + " user jobs.", 
                           time < 1000);
	}

	private long runEventLoop() {
		long startTime= System.currentTimeMillis();
		
		Display disp= Display.getCurrent();
		assertNotNull(disp);
		while(disp.readAndDispatch()) {
		}
		
		return System.currentTimeMillis() - startTime;
	}			
}
Comment 1 Lars Vogel CLA 2019-11-08 04:40:13 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant please remove the stalebug whiteboard tag.