klayout icon indicating copy to clipboard operation
klayout copied to clipboard

Selecting all nodes in the netlist browser with a hierarchical netlist stalls KLayout

Open klayoutmatthias opened this issue 6 years ago • 0 comments

To reproduce do this:

  • create/load a larger, hierarchical netlist, preferably with many small circuits into the netlist browser
  • In the right-side tree, expand all nodes (context menu)
  • Select all nodes (Ctrl+A or context menu)

The effect is that KLayout stalls.

The reason is a O(2) loop inside Qt5's QItemSelectionModelPrivate::expandSelection: the selection is fragmented because it spans multiple tree branches. The expandSelection method will call QItemSelection::merge time the number of fragments which itself calls QItemSelectionRange::intersects this number of times. Hence O(2). Bad for big selections.

klayoutmatthias avatar Nov 19 '19 23:11 klayoutmatthias