Skip to content

Save and restore the current plugin classpath container state from disk#1898

Merged
laeubi merged 1 commit intoeclipse-pde:masterfrom
laeubi:use_saved_state
Jul 26, 2025
Merged

Save and restore the current plugin classpath container state from disk#1898
laeubi merged 1 commit intoeclipse-pde:masterfrom
laeubi:use_saved_state

Conversation

@laeubi
Copy link
Copy Markdown
Contributor

@laeubi laeubi commented Jul 25, 2025

Computing the bundle plugin classpath can be an expensive operation for different reasons. In many cases these computation even yields the same results as before especially on workspace restart without target changes.

This now stores the last successful computed state per project and read it back on initialization of the classpath container, scheduling a check for actual changes in the background. Only if this check yields a different result or the update is requested as part of a change to the manifest or target state for example the current values are updated.

This yields faster startup times without the risk of blocking (other than file I/O) until PDE can deliver the classpath to consumers delaying the heavy work to a later time.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 25, 2025

Test Results

  618 files   -   147    618 suites   - 147   45m 0s ⏱️ - 5m 13s
3 611 tests ±    0  3 556 ✅  -     1   54 💤 ± 0  1 ❌ +1 
8 184 runs   - 2 650  8 044 ✅  - 2 627  139 💤  - 24  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 8a71945. ± Comparison against base commit 847f31d.

♻️ This comment has been updated with latest results.

@laeubi
Copy link
Copy Markdown
Contributor Author

laeubi commented Jul 26, 2025

Now this seems to make problems in API Tools test more prominent as things a probably to fast or at least have a different timing:

Copy link
Copy Markdown
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor cosmetic changes.

It appears PDE uses tracing for other things:

image

Comment thread ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathComputer.java Outdated
@laeubi laeubi force-pushed the use_saved_state branch 3 times, most recently from 01ee2b8 to ca0216b Compare July 26, 2025 09:21
@laeubi
Copy link
Copy Markdown
Contributor Author

laeubi commented Jul 26, 2025

@merks I now used the debug facility for that

@laeubi laeubi requested a review from merks July 26, 2025 09:22
@laeubi laeubi force-pushed the use_saved_state branch from ca0216b to 9eedd4b Compare July 26, 2025 09:24
Computing the bundle plugin classpath can be an expensive operation for
different reasons. In many cases these computation even yields the same
results as before especially on workspace restart without target
changes.

This now stores the last successful computed state per project and read
it back on initialization of the classpath container, scheduling a check
for actual changes in the background. Only if this check yields a
different result or the update is requested as part of a change to the
manifest or target state for example the current values are updated.

This yields faster startup times without the risk of blocking (other
than file I/O) until PDE can deliver the classpath to consumers delaying
the heavy work to a later time.
@laeubi laeubi force-pushed the use_saved_state branch from 9eedd4b to 8a71945 Compare July 26, 2025 09:25
@laeubi laeubi merged commit 512b94b into eclipse-pde:master Jul 26, 2025
17 of 19 checks passed
@laeubi
Copy link
Copy Markdown
Contributor Author

laeubi commented Jul 26, 2025

As it might has an impact due to different timings now I started an I-Build to see if anything goes wrong in the large scale:

iloveeclipse added a commit to iloveeclipse/eclipse.jdt.ui that referenced this pull request Jul 30, 2025
reconcile"

This reverts commit 1f01b41.

The code in PDE that used ClasspathContainerInitializer.class family is
gone, so this code is meaningless now and only increases code
complexity.

See eclipse-pde/eclipse.pde#1898
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.ui that referenced this pull request Jul 30, 2025
reconcile"

This reverts commit 1f01b41.

The code in PDE that used ClasspathContainerInitializer.class family is
gone, so this code is meaningless now and only increases code
complexity.

See eclipse-pde/eclipse.pde#1898
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.

2 participants