It looks like you're new here. If you want to get involved, click one of these buttons!
Hi, I have a python script going through large designs exploring cells, for this I open the designs using layout.read but the command takes 30s-1m to get through.
I only need the cell informations (layout.top_cells() , layout.each_cell() , cell.name)
I wonder if there is any way to make it faster?
Comments
If you have OASIS, it may store the top cell as an explicit property. Extracting that without reading the file is not a feature of KLayout, but I'm sure it's there is other tools. For example this one: https://github.com/klayoutmatthias/dump_oas_gds2 (look for "PROPERTY (name=S_TOP_CELL)").
If not (or your OASIS flavor does not have this information), you can speed up reading somewhat by skipping the shape information:
You can't skip reading the cell tree as that one will be needed to determine the top cell(s).
In some test cases I tried, this brought down the read times by 50%. Maybe the effect is much more pronounced if you have layouts that are heavy in shapes (i.e. flat ones).
Matthias
Thanks! the layout option has cut the time in about 50% indeed! great step forward for me. So far dump_oas_gds2 does not seems to make it faster but I will keep investigating.