← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] GerbView performance optimizations

 

One more performance patch for GerbView attached

On Sun, Feb 25, 2018 at 3:14 PM, Jon Evans <jon@xxxxxxxxxxxxx> wrote:

> These patches improves redraw performance when toggling sketch/filled draw
> modes.
>
> On Linux at least, the difference is quite noticeable on complicated
> Gerber files.
>
> -Jon
>
From 7978d9482f39490e96416980b01f47d5a97d1087 Mon Sep 17 00:00:00 2001
From: Jon Evans <jon@xxxxxxxxxxxxx>
Date: Sun, 25 Feb 2018 16:08:18 -0500
Subject: [PATCH] Remove extra call to SetTopLayer() when switching active
 layer

---
 gerbview/gerbview_frame.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp
index 72252108a..99bc24787 100644
--- a/gerbview/gerbview_frame.cpp
+++ b/gerbview/gerbview_frame.cpp
@@ -886,8 +886,6 @@ void GERBVIEW_FRAME::SetActiveLayer( int aLayer, bool doLayerWidgetUpdate )
         m_toolManager->RunAction( GERBVIEW_ACTIONS::layerChanged );       // notify other tools
         GetGalCanvas()->SetFocus();                 // otherwise hotkeys are stuck somewhere
 
-        // NOTE(JE) The next two calls are slow (scales with number of items)
-        GetGalCanvas()->SetTopLayer( GERBER_DRAW_LAYER( aLayer ) );
         GetGalCanvas()->SetHighContrastLayer( GERBER_DRAW_LAYER( aLayer ) );
 
         GetGalCanvas()->Refresh();
-- 
2.14.1


Follow ups

References