Skip to content

I20230808-1800

@fedejeanne fedejeanne tagged this 08 Aug 14:03
Calls to ISchedulingRule::isConflicting can be expensive, especially
when they end up calling ISchedulingRule::contains and it happens to be
a resource container (a workspace, a folder, etc) since they check all
children (see those 2 methods in the class
org.eclipse.core.internal.resources.Resource).
This commit moves 3 of such calls in the DeadlockDetector class all the
way to the end and takes advantage of the short-circuit logic in the
if-statements, which might end up not calling isConflicting at all and
saving some computation time.

Contributes to
https://github.com/eclipse-platform/eclipse.platform.ui/issues/983
Assets 2
Loading