Iterating to calculate ValidCells takes a long time (few sec), especially for ~4000 Cells (possibly an unusual case of ~1.5mm die?).
One way to solve this is to calculate the valid cells only when calling a function that affects it, and then store it as an Object property for later lookup - no need to recalculate. For example, the following functions should trigger a recalc:
- Cell/Matrix Shift
- Cell/CellSize
- EdgeClearance changes
- if, during a
get_ValidCells() the lookup table is not calc'd, then calculate it.
Apart from the above, get_ValidCells() should just return the lookup table stored int he object (eg. Cell.ValidCells).