From 232b28679396a6460f2a5c1bf7eb4149a1d3bd9e Mon Sep 17 00:00:00 2001
From: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
Date: Sun, 2 Feb 2025 18:45:35 +0100
Subject: [PATCH] router: comment out some excessive debug calls

Too much PNS_DBG() calls make the debug tool very sluggish, even in release mode.
---
 pcbnew/router/pns_optimizer.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp
index ada14a0edf..d2953d10ca 100644
--- a/pcbnew/router/pns_optimizer.cpp
+++ b/pcbnew/router/pns_optimizer.cpp
@@ -237,9 +237,9 @@ bool AREA_CONSTRAINT::Check( int aVertex1, int aVertex2, const LINE* aOriginLine
                 .Angle( aCurrentPath.CSegment( aVertex2 - 1 ) )
                 .IsHorizontal();
 
-    PNS_DBG( dbg, AddShape, m_allowedArea, YELLOW, 10000, wxT( "drag-affected-area" ) );
-    PNS_DBG( dbg, AddPoint, p1, YELLOW, 1000000, wxT( "drag-p1" ) );
-    PNS_DBG( dbg, AddPoint, p2, YELLOW, 1000000, wxT( "drag-p2" ) );
+    //PNS_DBG( dbg, AddShape, m_allowedArea, YELLOW, 10000, wxT( "drag-affected-area" ) );
+    //PNS_DBG( dbg, AddPoint, p1, YELLOW, 1000000, wxT( "drag-p1" ) );
+    //PNS_DBG( dbg, AddPoint, p2, YELLOW, 1000000, wxT( "drag-p2" ) );
 
     return false;
 }
@@ -617,7 +617,7 @@ bool OPTIMIZER::Optimize( const LINE* aLine, LINE* aResult, LINE* aRoot )
 
     if( aRoot )
     {
-        PNS_DBG( dbg, AddItem, aRoot, BLUE, 100000, wxT( "root-line" ) );
+        //PNS_DBG( dbg, AddItem, aRoot, BLUE, 100000, wxT( "root-line" ) );
     }
 
 
@@ -636,9 +636,9 @@ bool OPTIMIZER::Optimize( const LINE* aLine, LINE* aResult, LINE* aRoot )
         int rootObtuseCorners = aRoot->CountCorners( angleMask );
         auto c = new CORNER_COUNT_LIMIT_CONSTRAINT( m_world, rootObtuseCorners,
                                                     aLine->SegmentCount(), angleMask );
-        PNS_DBG( dbg, Message,
-                 wxString::Format( "opt limit-corner-count root %d maxc %d mask %x",
-                                   rootObtuseCorners, aLine->SegmentCount(), angleMask ) );
+        //PNS_DBG( dbg, Message,
+         //        wxString::Format( "opt limit-corner-count root %d maxc %d mask %x",
+           //                        rootObtuseCorners, aLine->SegmentCount(), angleMask ) );
 
         addConstraint( c );
     }
@@ -660,7 +660,7 @@ bool OPTIMIZER::Optimize( const LINE* aLine, LINE* aResult, LINE* aRoot )
     {
         auto c = new AREA_CONSTRAINT( m_world, m_restrictArea, m_restrictAreaIsStrict );
         SHAPE_RECT r( m_restrictArea );
-        PNS_DBG( dbg, AddShape, &r, YELLOW, 0, wxT( "area-constraint" ) );
+        //PNS_DBG( dbg, AddShape, &r, YELLOW, 0, wxT( "area-constraint" ) );
         addConstraint( c );
     }