Commit 31bb835
[performance] Avoid O(n^2) in DeadlockDetector.lockAcquired()
With n conflicting rules. "conflicting.contains(possible)" has been
observed as severe hotspot in a workspace with n= ~1000 projects,
especially because all n Jobs did the same.
Also avoid second pass if nothing changed.
Functionality is tested with
IJobManagerTest.testTransferToJobWaitingOnChildRule()
OrderedLockTest.testComplex()
DeadlockDetectionTest.testImplicitRules()1 parent 7fa8bbc commit 31bb835
File tree
1 file changed
+22
-13
lines changed- runtime/bundles/org.eclipse.core.jobs/src/org/eclipse/core/internal/jobs
1 file changed
+22
-13
lines changedLines changed: 22 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
304 | 307 | | |
305 | 308 | | |
306 | 309 | | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | 310 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
321 | 329 | | |
322 | 330 | | |
323 | 331 | | |
| 332 | + | |
324 | 333 | | |
325 | 334 | | |
326 | 335 | | |
| |||
0 commit comments