Skip to content

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Jan 22, 2026

Optimize access rule accumulation by using Set instead of List to avoid O(N) containment checks during insertion, which was causing O(N^2) complexity for plug-ins with many re-exported packages.

Additionally, add a recursion guard in findExportedPackages to prevent infinite loops when processing cyclic re-exports in implicit or secondary dependencies.

@laeubi
Copy link
Contributor

laeubi commented Jan 22, 2026

Please add meaningful title and descriptions see https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md#using-draft-pull-requests before opening draft PRs.

@github-actions
Copy link

github-actions bot commented Jan 22, 2026

Test Results

  135 files   -    663  135 suites   - 663   12m 16s ⏱️ - 48m 54s
  396 tests  -  3 336  308 ✅  - 3 287   88 💤  -  48  0 ❌  - 1 
1 119 runs   - 10 008  854 ✅  - 9 863  265 💤  - 144  0 ❌  - 1 

Results for commit 6bc9ca3. ± Comparison against base commit d2bff11.

This pull request removes 3336 tests.
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testAbsentHeader
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testChangeExistingActivator
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testGetActivator
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testHeaderLength
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testHeaderLengthWithWindowsDelimiter
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testHeaderOffset1
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testHeaderOffset2
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testPresentHeader
AllPDETests AllBundleModelTests BundleActivatorTestCase ‑ testSetActivator
AllPDETests AllBundleModelTests BundleClasspathTestCase ‑ testAbsentHeader
…

♻️ This comment has been updated with latest results.

@vogella vogella changed the title Classpath computation Fix performance issue and infinite loop in classpath computation Jan 22, 2026
@vogella vogella force-pushed the classpath-computation branch 3 times, most recently from 6a26333 to d023d5c Compare January 23, 2026 15:13
Optimize access rule accumulation by using Set<Rule> instead of List<Rule> to avoid O(N) containment checks during insertion, which was causing O(N^2) complexity for plug-ins with many re-exported packages.

Additionally, add a recursion guard in findExportedPackages to prevent infinite loops when processing cyclic re-exports in implicit or secondary dependencies.
This test verifies that classpath computation finishes quickly even when
secondary dependencies form a cyclic re-export graph.

Previously, this scenario caused an infinite loop in
'findExportedPackages', leading to a build hang. The new test
'testCyclicReexportInSecondaryDependencies' constructs such a cycle and
asserts that computation completes within a reasonable time.
This test verifies performance in a chained re-export scenario (A->B->C->D, all re-exporting and exporting many packages) to ensure O(N) scaling and avoid redundant processing.
@vogella vogella force-pushed the classpath-computation branch from d023d5c to 6bc9ca3 Compare January 23, 2026 16:26
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