From 7f56ff4d42989ef9a484670b2e3ed8df5d7160ac Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 2 Jun 2021 08:15:37 -0700 Subject: [PATCH] Minor performance improvement Don't keep searching the DRC RTree for collisions after we detect a true (not clearance-based) collision --- pcbnew/drc/drc_rtree.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/drc/drc_rtree.h b/pcbnew/drc/drc_rtree.h index 0953d19ee5..2efa494489 100644 --- a/pcbnew/drc/drc_rtree.h +++ b/pcbnew/drc/drc_rtree.h @@ -263,6 +263,10 @@ public: actual = curActual; pos = curPos; } + + // Stop looking after we have a true collision + if( actual <= 0 ) + return false; } return true;