Slow performance with eeschema

eeschema has also become very slow. Any action - freezing for ~4 seconds.
Profiling: calls to recalculate connections in OnModify().
“IncrementalConnectivity=1” in kicad_advanced doesn’t help.

Ryzen 9 6900HX, 64GB
build kicad with -DPROFILE and adding some timers to source

Add profilng DoDelete() and OnModify() in sch_edit_frame.cpp
log:

RecalculateConnections()/SchematicCleanUp() took 283.283ms
RecalculateConnections()/RecomputeIntersheetRefs() took 16.5147ms
RecalculateConnections()/changeHandler took 191ns
updateItemConnectivity took 3.05697s
buildConnectionGraph took 451.151ms
CONNECTION_GRAPH::Recalculate took 3.50817s
RecalculateConnections()/Recalculate() took 3.5115s
UpdateAllItemsCond() took 9.72191ms
OpenProjectFile took 6.00987s

DoDelete() took 28.0067ms
DoDelete()/Refresh() took 520ns
OnModify()/SetContentModified() took 30ns
RecalculateConnections()/SchematicCleanUp() took 60ns
RecalculateConnections()/RecomputeIntersheetRefs() took 37.5792ms
RecalculateConnections()/changeHandler took 671ns
RecalculateConnections()/for changed_list->GetCount() took 1.222µs
RecalculateConnections()/for pts took 1.793µs
RecalculateConnections()/all_items took 7.14511ms
RecalculateConnections()/graph() took 281ns
RecalculateConnections()/for all_items took 982ns
updateItemConnectivity took 2.25598s
buildConnectionGraph took 2.3635ms
CONNECTION_GRAPH::Recalculate took 2.25836s
RecalculateConnections()/new_graph.Recalculate() took 2.25838s
UpdateAllItemsCond() took 14.1569ms
OnModify()/RecalculateConnections( NO_CLEANUP ) took 2.31896s
OnModify()/Refresh() took 36.5715ms
OnModify()/UpdateHierarchyNavigator() took 3.50247ms
OnModify()/updateTitle() took 1.39457ms
DoDelete()/OnModify() took 2.36047s
OnModify()/SetContentModified() took 390ns
RecalculateConnections()/SchematicCleanUp() took 40ns
RecalculateConnections()/RecomputeIntersheetRefs() took 36.1186ms
RecalculateConnections()/changeHandler took 180ns
updateItemConnectivity took 2.9636s
buildConnectionGraph took 435.02ms
CONNECTION_GRAPH::Recalculate took 3.42203s
RecalculateConnections()/Recalculate() took 3.42647s
UpdateAllItemsCond() took 10.9548ms
OnModify()/RecalculateConnections( NO_CLEANUP ) took 3.47481s
OnModify()/Refresh() took 54.132ms
OnModify()/UpdateHierarchyNavigator() took 2.84925ms
OnModify()/updateTitle() took 1.573µs

And Refresh() two more times. Both in DoDelete() and inside OnModify().

Please report your own bug with your own design attached for this; it needs to be investigated separately from OP’s design.

1 Like

Similar performance issues, only in pcbnew, have been fixed before, many years ago (~2010).
There was also a recalculation of connections when necessary and not necessary.

Sorry. This design under NDA.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.