Skip to content

Improve progress reporting in ClasspathContainerState#2152

Merged
vogella merged 1 commit intoeclipse-pde:masterfrom
vogella:improve-progress-reporting-for-classpath-update
Dec 8, 2025
Merged

Improve progress reporting in ClasspathContainerState#2152
vogella merged 1 commit intoeclipse-pde:masterfrom
vogella:improve-progress-reporting-for-classpath-update

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Dec 5, 2025

Updated the run method to drain the workQueue into a local list at the start. This allows for an accurate count of pending tasks and prevents the performance penalty of calling ConcurrentLinkedQueue.size() (which is O(n)) inside the loop.

Removed the repeated monitor.setWorkRemaining(WORK) call inside the loop, which was causing the progress bar to reset and appear stuck.

Implemented logic to estimate work: count * 2 ticks are allocated initially (assuming 1 tick for checking and 1 tick for potential update). This seems a bit too much for the classpath update in my test environment but is much better then before and it is difficult to judge how long the classpath update will actually take.

Updated monitor.worked(1) to happen for every processed request.

Adjusted the remaining work for the final phase (setProjectContainers) based on the actual number of projects requiring updates.

In a small / fast environment you may want to a Thread.sleep() to the loop, in my client environment with > 900 bundles the process is not much better visible.

@vogella vogella marked this pull request as draft December 5, 2025 13:38
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Test Results

   771 files  ±0     771 suites  ±0   1h 1m 22s ⏱️ + 1m 46s
 3 648 tests ±0   3 593 ✅  - 1   54 💤 ±0  1 ❌ +1 
10 878 runs  ±0  10 714 ✅  - 1  163 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 48d2c87. ± Comparison against base commit df29a67.

♻️ This comment has been updated with latest results.

@vogella vogella marked this pull request as ready for review December 5, 2025 14:22
@vogella vogella force-pushed the improve-progress-reporting-for-classpath-update branch from 7510cbe to 89231a7 Compare December 5, 2025 18:27
Updated the run method to drain the workQueue into a local list at the
start. This allows for an accurate count of pending tasks and prevents
the performance penalty of calling ConcurrentLinkedQueue.size() (which
is O(n)) inside the loop.

Removed the repeated monitor.setWorkRemaining(WORK) call inside the
loop, which was causing the progress bar to reset and appear stuck.

Implemented logic to estimate work: count * 2 ticks are allocated
initially (assuming 1 tick for checking and 1 tick for potential
update). This seems a bit too much for the classpath update in my test
environment but is much better then before and it is difficult to judge
how long the classpath update will actually take.

Updated monitor.worked(1) to happen for every processed request.

Adjusted the remaining work for the final phase (setProjectContainers)
based on the actual number of projects requiring updates.

In a small / fast environment you may want to a Thread.sleep() to the
loop, in my client environment with > 900 bundles the process is not
much better visible.
@vogella vogella force-pushed the improve-progress-reporting-for-classpath-update branch from 89231a7 to 48d2c87 Compare December 8, 2025 07:58
@vogella
Copy link
Contributor Author

vogella commented Dec 8, 2025

Test issue unrelated and reported here: #2128

@vogella vogella merged commit a9412e2 into eclipse-pde:master Dec 8, 2025
17 of 19 checks passed
@vogella vogella deleted the improve-progress-reporting-for-classpath-update branch December 8, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments