diff --git a/eeschema/connection_graph.h b/eeschema/connection_graph.h index bc25b95e44..eac2cc74b0 100644 --- a/eeschema/connection_graph.h +++ b/eeschema/connection_graph.h @@ -472,6 +472,18 @@ public: */ void ExchangeItem( SCH_ITEM* aOldItem, SCH_ITEM* aNewItem ); + /** + * We modify how we handle the connectivity graph for small graphs vs large + * graphs. Partially this is to avoid unneeded complexity for small graphs, + * where the performance of the graph is not a concern. This is considered + * a temporary solution until the connectivity graph is refactored with an + * eye toward partial updates + */ + bool IsMinor() const + { + return m_items.size() < 10000; + } + private: /** * Update the graphical connectivity between items (i.e. where they touch) diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 7da4a8b455..cada5b0288 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1779,7 +1779,7 @@ void SCH_EDIT_FRAME::RecalculateConnections( SCH_COMMIT* aCommit, SCH_CLEANUP_FL }; if( !ADVANCED_CFG::GetCfg().m_IncrementalConnectivity || aCleanupFlags == GLOBAL_CLEANUP - || m_undoList.m_CommandsList.empty() ) + || m_undoList.m_CommandsList.empty()|| Schematic().ConnectionGraph()->IsMinor() ) { // Update all rule areas so we can cascade implied connectivity changes std::unordered_set all_screens;