Commit 19e78d8
Fix API tools slow down with multiple source folders sharing output
The fix in commit 215a618 for issue #2096 introduced an O(n^2) time
complexity regression when projects have multiple source folders
sharing the same output location (like SWT with 26 source roots).
The problem was that each source folder caused a new CompositeApiTypeContainer
to be created, wrapping all previous containers plus a new one. This
resulted in exponential duplication of container visits during API analysis.
The fix modifies ProjectTypeContainer to support multiple
IPackageFragmentRoots, allowing a single container to discover packages
from all source folders that share the same output location. This avoids
creating composite containers and maintains O(n) complexity.
Fixes #2197
Signed-off-by: moaead <moaead@users.noreply.github.com>1 parent 324fb67 commit 19e78d8
File tree
3 files changed
+33
-31
lines changed- apitools
- org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/compatibility
- org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model
3 files changed
+33
-31
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
265 | 267 | | |
266 | 268 | | |
267 | 269 | | |
| |||
Lines changed: 4 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
422 | | - | |
| 421 | + | |
423 | 422 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
446 | 426 | | |
447 | 427 | | |
448 | 428 | | |
| |||
Lines changed: 26 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
71 | 89 | | |
72 | 90 | | |
73 | 91 | | |
| |||
159 | 177 | | |
160 | 178 | | |
161 | 179 | | |
162 | | - | |
163 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
164 | 184 | | |
165 | 185 | | |
166 | 186 | | |
| |||
0 commit comments