Turn off incremental connectivity for small schematics

The benefit of incremental connectivity is only for larger
schematics.  For smaller schematics, the downside of larger bug surface
outweighs the current benefits
This commit is contained in:
Seth Hillbrand 2024-06-03 11:33:29 -07:00
parent d44bf89b98
commit 74998790e8
2 changed files with 13 additions and 1 deletions

View File

@ -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)

View File

@ -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<SCH_SCREEN*> all_screens;