Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339311 - [Progress] Every user-job causes a busy cursor to be shown for a minimum of 250ms
Summary: [Progress] Every user-job causes a busy cursor to be shown for a minimum of 2...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6.2+   Edit
Assignee: Prakash Rangaraj CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on: 313899
Blocks:
  Show dependency tree
 
Reported: 2011-03-08 23:58 EST by Prakash Rangaraj CLA
Modified: 2019-11-08 04:40 EST (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.