Improve progress reporting in ClasspathContainerState#2152
Merged
vogella merged 1 commit intoeclipse-pde:masterfrom Dec 8, 2025
Merged
Conversation
Test Results 771 files ±0 771 suites ±0 1h 1m 22s ⏱️ + 1m 46s 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. |
7510cbe to
89231a7
Compare
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.
89231a7 to
48d2c87
Compare
Contributor
Author
|
Test issue unrelated and reported here: #2128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.