mirror of https://github.com/KLayout/klayout.git
Fixes issue #1453: fixed performance issue which was caused by a deep search for texts in transient selection
This commit is contained in:
parent
28e0b36155
commit
4742e255fc
|
|
@ -475,6 +475,8 @@ ShapeFinder::checkpoint ()
|
|||
void
|
||||
ShapeFinder::visit_cell (const db::Cell &cell, const db::Box &hit_box, const db::Box &scan_box, const db::DCplxTrans &vp, const db::ICplxTrans &t, int /*level*/)
|
||||
{
|
||||
checkpoint ();
|
||||
|
||||
if (! m_context_layers.empty ()) {
|
||||
|
||||
std::map<db::cell_index_type, bool>::const_iterator ctx = m_cells_with_context.find (cell.cell_index ());
|
||||
|
|
@ -499,12 +501,12 @@ ShapeFinder::visit_cell (const db::Cell &cell, const db::Box &hit_box, const db:
|
|||
|
||||
if (! point_mode ()) {
|
||||
|
||||
checkpoint ();
|
||||
|
||||
for (std::vector<int>::const_iterator l = layers ().begin (); l != layers ().end (); ++l) {
|
||||
|
||||
if (layers ().size () == 1 || (layers ().size () > 1 && cell.bbox ((unsigned int) *l).touches (scan_box))) {
|
||||
|
||||
checkpoint ();
|
||||
|
||||
const db::Shapes &shapes = cell.shapes ((unsigned int) *l);
|
||||
|
||||
db::ShapeIterator shape = shapes.begin_touching (scan_box, m_flags, mp_prop_sel, m_inv_prop_sel);
|
||||
|
|
@ -560,6 +562,8 @@ ShapeFinder::visit_cell (const db::Cell &cell, const db::Box &hit_box, const db:
|
|||
db::ShapeIterator shape = shapes.begin_touching (scan_box, m_flags, mp_prop_sel, m_inv_prop_sel);
|
||||
while (! shape.at_end ()) {
|
||||
|
||||
checkpoint ();
|
||||
|
||||
bool match = false;
|
||||
double d = std::numeric_limits<double>::max ();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue