Hi Sjoerd, Other than the code not working because cv~>lpps is a list of dbObjects not a list of lists (of layer and purpose names), the pattern of first finding a list of all shapes which match the given layerName and purpose and objType will be slower and more memory consuming, unless there are a very small number of shapes in the cellView (even then I suspect it would not be quicker). The reasons are: Doing cv~>shapes has to build a list of objects for every shape in the design (whilst the database has all these shapes, the list construction takes time and memory) You then have to visit every single shape and then construct a new list (the setof) with just those which are labels on the right layer purpose Then you foreach over that reduced list (it would have been better to just do a foreach over all shapes and then have a when() instead of the setof to do something when the condition matched In my case, I traverse the layer-purpose objects (of which there are typically relatively few), and I only search until I find a match (so that means on average half the LPP objects). From there I directly get just the shapes that are on that layer-purpose pair - I don't need to visit all the shapes on layer-purposes that I don't care about - so no big list was generated with lots of things in it that don't matter. So my approach would be generally faster, take less memory, and produce less garbage to be collected. I think the code is actually simpler too! Regards, Andrew.
↧