Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 505936 - Make SubMonitor.split() return this for children that can't return any progress
Summary: Make SubMonitor.split() return this for children that can't return any progress
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: Oxygen M3   Edit
Assignee: Stefan Xenos CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 506217 506447
  Show dependency tree
 
Reported: 2016-10-13 23:49 EDT by Stefan Xenos CLA
Modified: 2016-10-25 17:51 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Xenos CLA 2016-10-13 23:49:05 EDT
Any given SubMonitor tree will only report 1000 integer units of progress. That means all the remaining children will never report any work.

All such children could just return "this" for all calls to SubMonitor.split and newChild that don't change the flags. We should also be able to return "this" from any call to newChild that consumes the entire monitor.

That effectively means that there would never be more than 2000 SubMonitors instantiated on any given progress monitor subtree.

For progress monitors rooted under "null" (they were initiated via a call to SubMonitor.convert(null, ...)), even the root SubMonitor could return "this" from  most calls rather than consuming its entire allocation of 1000 ticks.
Comment 1 Eclipse Genie CLA 2016-10-14 01:44:18 EDT
New Gerrit change created: https://git.eclipse.org/r/83176