Force realtime connectivity on
The pressure relief valve was not useful for common work patterns as it
forced the recalculation on many common actions such as bus expansion.
This caused it to actually feel slower than with the pressure relief
valve off.
For most schematics, realtime is now fast enough to not need the valve
and for those that are extremely complex, removing the valve helps this
run more predictably
(cherry picked from commit e6dbca051c
)
This commit is contained in:
parent
6d96059917
commit
4e34bdb621
|
@ -82,13 +82,6 @@ static const wxChar DRCEpsilon[] = wxT( "DRCEpsilon" );
|
|||
*/
|
||||
static const wxChar HoleWallThickness[] = wxT( "HoleWallPlatingThickness" );
|
||||
|
||||
/**
|
||||
* Testing mode for new connectivity algorithm. Setting this to on will cause all modifications
|
||||
* to the netlist to be recalculated on the fly. This may be slower than the standard process
|
||||
* at the moment
|
||||
*/
|
||||
static const wxChar RealtimeConnectivity[] = wxT( "RealtimeConnectivity" );
|
||||
|
||||
/**
|
||||
* Configure the coroutine stack size in bytes. This should be allocated in multiples of
|
||||
* the system page size (n*4096 is generally safe)
|
||||
|
@ -260,7 +253,6 @@ ADVANCED_CFG::ADVANCED_CFG()
|
|||
|
||||
// Init defaults - this is done in case the config doesn't exist,
|
||||
// then the values will remain as set here.
|
||||
m_RealTimeConnectivity = true;
|
||||
m_CoroutineStackSize = AC_STACK::default_stack;
|
||||
m_ShowRouterDebugGraphics = false;
|
||||
m_DrawArcAccuracy = 10.0;
|
||||
|
@ -333,9 +325,6 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
{
|
||||
std::vector<PARAM_CFG*> configParams;
|
||||
|
||||
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::RealtimeConnectivity,
|
||||
&m_RealTimeConnectivity, m_RealTimeConnectivity ) );
|
||||
|
||||
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::ExtraFillMargin,
|
||||
&m_ExtraClearance, m_ExtraClearance, 0.0, 1.0 ) );
|
||||
|
||||
|
|
|
@ -410,9 +410,6 @@ CONNECTION_SUBGRAPH::PRIORITY CONNECTION_SUBGRAPH::GetDriverPriority( SCH_ITEM*
|
|||
}
|
||||
|
||||
|
||||
bool CONNECTION_GRAPH::m_allowRealTime = true;
|
||||
|
||||
|
||||
void CONNECTION_GRAPH::Reset()
|
||||
{
|
||||
for( auto& subgraph : m_subgraphs )
|
||||
|
@ -481,17 +478,6 @@ void CONNECTION_GRAPH::Recalculate( const SCH_SHEET_LIST& aSheetList, bool aUnco
|
|||
|
||||
if( wxLog::IsAllowedTraceMask( ConnProfileMask ) )
|
||||
recalc_time.Show();
|
||||
|
||||
#ifndef DEBUG
|
||||
// Pressure relief valve for release builds
|
||||
const double max_recalc_time_msecs = 250.;
|
||||
|
||||
if( m_allowRealTime && ADVANCED_CFG::GetCfg().m_RealTimeConnectivity &&
|
||||
recalc_time.msecs() > max_recalc_time_msecs )
|
||||
{
|
||||
m_allowRealTime = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -537,10 +537,6 @@ private:
|
|||
*/
|
||||
int ercCheckHierSheets();
|
||||
|
||||
public:
|
||||
// TODO(JE) Remove this when pressure valve is removed
|
||||
static bool m_allowRealTime;
|
||||
|
||||
private:
|
||||
// All the sheets in the schematic (as long as we don't have partial updates)
|
||||
SCH_SHEET_LIST m_sheetList;
|
||||
|
|
|
@ -578,11 +578,6 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
|||
NETLIST_EXPORTER_KICAD exporter( &Schematic() );
|
||||
STRING_FORMATTER formatter;
|
||||
|
||||
// TODO remove once real-time connectivity is a given
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
// Ensure the netlist data is up to date:
|
||||
RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
exporter.Format( &formatter, GNL_ALL | GNL_OPT_KICAD );
|
||||
|
||||
payload = formatter.GetString();
|
||||
|
|
|
@ -109,10 +109,6 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS( SCH_
|
|||
m_parent = parent;
|
||||
m_appendUndo = false;
|
||||
|
||||
// TODO(JE) remove once real-time connectivity is a given
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
m_parent->RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
m_lineStyle->Append( DEFAULT_STYLE );
|
||||
m_lineStyle->Append( INDETERMINATE_ACTION );
|
||||
|
||||
|
|
|
@ -489,7 +489,6 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
{
|
||||
DIALOG_MIGRATE_BUSES dlg( this );
|
||||
dlg.ShowQuasiModal();
|
||||
RecalculateConnections( NO_CLEANUP );
|
||||
OnModify();
|
||||
}
|
||||
|
||||
|
|
|
@ -48,9 +48,6 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam
|
|||
// Ensure all power symbols have a valid reference
|
||||
Schematic().GetSheets().AnnotatePowerSymbols();
|
||||
|
||||
// Ensure the netlist data is up to date:
|
||||
RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
if( !ReadyToNetlist( _( "Exporting netlist requires a fully annotated schematic." ) ) )
|
||||
return false;
|
||||
|
||||
|
|
|
@ -443,9 +443,6 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
|
|||
#if defined(DEBUG)
|
||||
// These messages are not flagged as translatable, because they are only debug messages
|
||||
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
return;
|
||||
|
||||
if( IsBus() )
|
||||
aList.emplace_back( wxT( "Bus Code" ), wxString::Format( wxT( "%d" ), m_bus_code ) );
|
||||
|
||||
|
|
|
@ -839,10 +839,7 @@ void SCH_EDIT_FRAME::OnModify()
|
|||
|
||||
GetScreen()->SetContentModified();
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_RealTimeConnectivity && CONNECTION_GRAPH::m_allowRealTime )
|
||||
RecalculateConnections( NO_CLEANUP );
|
||||
else
|
||||
GetScreen()->SetConnectivityDirty();
|
||||
RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
GetCanvas()->Refresh();
|
||||
UpdateHierarchyNavigator();
|
||||
|
|
|
@ -228,9 +228,6 @@ int SCH_EDITOR_CONTROL::RemapSymbols( const TOOL_EVENT& aEvent )
|
|||
|
||||
int SCH_EDITOR_CONTROL::Print( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
m_frame->RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
InvokeDialogPrintUsingPrinter( m_frame );
|
||||
|
||||
wxFileName fn = m_frame->Prj().AbsolutePath( m_frame->Schematic().RootScreen()->GetFileName() );
|
||||
|
@ -244,9 +241,6 @@ int SCH_EDITOR_CONTROL::Print( const TOOL_EVENT& aEvent )
|
|||
|
||||
int SCH_EDITOR_CONTROL::Plot( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
m_frame->RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
DIALOG_PLOT_SCHEMATIC dlg( m_frame );
|
||||
|
||||
dlg.ShowModal();
|
||||
|
@ -1061,10 +1055,6 @@ int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent )
|
|||
KIGFX::VIEW_CONTROLS* controls = getViewControls();
|
||||
VECTOR2D cursorPos = controls->GetCursorPosition( !aEvent.DisableGridSnapping() );
|
||||
|
||||
// TODO remove once real-time connectivity is a given
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
// Ensure the netlist data is up to date:
|
||||
m_frame->RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
// Remove selection in favor of highlighting so the whole net is highlighted
|
||||
selectionTool->ClearSelection();
|
||||
|
@ -1314,10 +1304,6 @@ int SCH_EDITOR_CONTROL::UpdateNetHighlighting( const TOOL_EVENT& aEvent )
|
|||
|
||||
int SCH_EDITOR_CONTROL::HighlightNetCursor( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
// TODO(JE) remove once real-time connectivity is a given
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
m_frame->RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
std::string tool = aEvent.GetCommandStr().get();
|
||||
PICKER_TOOL* picker = m_toolMgr->GetTool<PICKER_TOOL>();
|
||||
|
||||
|
@ -2090,9 +2076,7 @@ int SCH_EDITOR_CONTROL::GenerateBOM( const TOOL_EVENT& aEvent )
|
|||
|
||||
int SCH_EDITOR_CONTROL::DrawSheetOnClipboard( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
m_frame->RecalculateConnections( LOCAL_CLEANUP );
|
||||
|
||||
m_frame->RecalculateConnections( LOCAL_CLEANUP );
|
||||
m_frame->DrawCurrentSheetToClipboard();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -93,7 +93,6 @@ protected:
|
|||
private:
|
||||
void update() override
|
||||
{
|
||||
SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) getToolManager()->GetToolHolder();
|
||||
EE_SELECTION_TOOL* selTool = getToolManager()->GetTool<EE_SELECTION_TOOL>();
|
||||
KICAD_T busType[] = { SCH_LINE_LOCATE_BUS_T, EOT };
|
||||
EE_SELECTION& selection = selTool->RequestSelection( busType );
|
||||
|
@ -101,16 +100,6 @@ private:
|
|||
|
||||
Clear();
|
||||
|
||||
// TODO(JE) remove once real-time is enabled
|
||||
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
|
||||
{
|
||||
frame->RecalculateConnections( NO_CLEANUP );
|
||||
|
||||
// Pick up the pointer again because it may have been changed by SchematicCleanUp
|
||||
selection = selTool->RequestSelection( busType );
|
||||
bus = (SCH_LINE*) selection.Front();
|
||||
}
|
||||
|
||||
if( !bus )
|
||||
{
|
||||
Append( ID_POPUP_SCH_UNFOLD_BUS, _( "No bus selected" ), wxEmptyString );
|
||||
|
|
|
@ -107,11 +107,6 @@ public:
|
|||
*/
|
||||
double m_HoleWallThickness;
|
||||
|
||||
/**
|
||||
* Do real-time connectivity
|
||||
*/
|
||||
bool m_RealTimeConnectivity;
|
||||
|
||||
/**
|
||||
* Set the stack size for coroutines
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue