Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341990 - [Progress] Progress View does not display all jobs
Summary: [Progress] Progress View does not display all jobs
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact: Prakash Rangaraj CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 05:11 EDT by Andrew CLA
Modified: 2011-05-17 01:06 EDT (History)
2 users (show)

See Also:


Attachments
Screenshow (37.25 KB, image/png)
2011-04-06 05:14 EDT, Andrew CLA
no flags Details
Screenshot - Illustrating 2nd code snippet (34.85 KB, image/png)
2011-04-06 08:54 EDT, Andrew CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew CLA 2011-04-06 05:11:42 EDT
Build Identifier: M20110210-1200

If you create a large number of Jobs they are not all displayed in the progress view.

About 15 will be displayed (it seems the first 15 when ordering the jobs by name alphabetically) and the rest will not. 

Reproducible: Always

Steps to Reproduce:
1. Create a new Eclipse Plugin project and place the following code in Activator.start()

for(int i  = 0; i <= 150; i++)
{
	Job job = new Job("" + i) {
	
	@Override
	protected IStatus run(IProgressMonitor monitor)
	{
		monitor.beginTask("sleep", IProgressMonitor.UNKNOWN);
		try
		{
			Thread.sleep(60000);
		}
		catch (InterruptedException e)
		{
					
		}
		monitor.done();
         	return Status.OK_STATUS;
		}
	};
			
	job.schedule();
}

Only around 15 jobs are displayed in my progress view.
Comment 1 Andrew CLA 2011-04-06 05:14:09 EDT
Created attachment 192622 [details]
Screenshow

Note the lack of scroll bar on the Progress View. Also when highlight the progress view and push down on my keyboard it us evident that the visible jobs are the only jobs there are.
Comment 2 Prakash Rangaraj CLA 2011-04-06 05:41:48 EDT
The progress view updates itself in a low priority job. When the system has about 150 operations running, the progress view would not get enough CPU cycles to update itself. We could bump up the priority of this job, but then reporting progress isn't as important as the operation itself.
Comment 3 Andrew CLA 2011-04-06 05:44:08 EDT
(In reply to comment #2)
> The progress view updates itself in a low priority job. When the system has
> about 150 operations running, the progress view would not get enough CPU cycles
> to update itself. We could bump up the priority of this job, but then reporting
> progress isn't as important as the operation itself.

Is it possible to manipulate the priority of this view update job?
Comment 4 Andrew CLA 2011-04-06 05:46:29 EDT
(In reply to comment #2)
> The progress view updates itself in a low priority job. When the system has
> about 150 operations running, the progress view would not get enough CPU cycles
> to update itself. We could bump up the priority of this job, but then reporting
> progress isn't as important as the operation itself.

Additionally, I also notice this behavior when the jobs can only run 1 at a time due to IScheduleRule.
Comment 5 Prakash Rangaraj CLA 2011-04-06 07:03:54 EDT
(In reply to comment #3)
> Is it possible to manipulate the priority of this view update job?

  No.
Comment 6 Andrew CLA 2011-04-06 08:53:15 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > The progress view updates itself in a low priority job. When the system has
> > about 150 operations running, the progress view would not get enough CPU cycles
> > to update itself. We could bump up the priority of this job, but then reporting
> > progress isn't as important as the operation itself.
> 
> Is it possible to manipulate the priority of this view update job?

Perhaps I have misunderstood your comment but my understanding from this is that if it were the cause that you had 150 jobs - 1 running and 149 queued then this problem should not present? I'm afraid I find that it does:

Extending the above code..

class NoSimRule implements ISchedulingRule
	{
		public boolean contains(ISchedulingRule rule)
		{
			return this == rule;
		}

	
		public boolean isConflicting(ISchedulingRule rule)
		{
			return (rule instanceof NoSimRule);
		
		}
}

and in Activator.start()

for(int i  = 0; i <= 150; i++)
	{
		Job job = new Job("" + i) {
			
			@Override
			protected IStatus run(IProgressMonitor monitor)
			{
			monitor.beginTask("sleep",IProgressMonitor.UNKNOWN);
			try
			{
				Thread.sleep(60000);
			}
			catch (InterruptedException e)
			{
				
			}
			monitor.done();
			return Status.OK_STATUS;
			}
		};
		job.setRule(new NoSimRule());
		job.schedule();
	}

Results in the exact same issue - shouldn't this not present?
Comment 7 Andrew CLA 2011-04-06 08:54:38 EDT
Created attachment 192638 [details]
Screenshot - Illustrating 2nd code snippet

Illustrates the second snippet of code i have posted
Comment 8 Andrew CLA 2011-05-16 04:46:20 EDT
I was wondering if there was any update on this re: my previous clarifications.

I am continuing to see this issue - with many jobs queued it is rare to have more than 20 of them visible. 

The scroll bar on the Progress View will indicate that there are more than 20 but scrolling down reveals blank space - this to me suggests that this might be a bug.

Just to clarify: This isn't simultaneous execution of 100s of jobs, but 100s of jobs queued up executing 1 at a time. Even after a long time the visible jobs in the progress view is only around 20.
Comment 9 Prakash Rangaraj CLA 2011-05-16 08:52:39 EDT
Progress View limits the maximum possible jobs displayed to be 20. See: org.eclipse.ui.internal.progress.DetailedProgressViewer.MAX_DISPLAYED
Comment 10 Andrew CLA 2011-05-16 09:58:11 EDT
(In reply to comment #9)
> Progress View limits the maximum possible jobs displayed to be 20. See:
> org.eclipse.ui.internal.progress.DetailedProgressViewer.MAX_DISPLAYED

Thanks for the response, I hadn't seen that.

Is there a way / are there any plans to allow this to be overridden?
Comment 11 Prakash Rangaraj CLA 2011-05-17 01:02:56 EDT
(In reply to comment #10)
> Is there a way / are there any plans to allow this to be overridden?

   No. There is no point in showing too many items in the UI when there is no way to filter them.
Comment 12 Prakash Rangaraj CLA 2011-05-17 01:06:50 EDT
This isn't a bug and the number of items are limited deliberately. There is no plans to increase/override this.