heitzmann / gdstk

Gdstk (GDSII Tool Kit) is a C++/Python library for creation and manipulation of GDSII and OASIS files.
https://heitzmann.github.io/gdstk/
Boost Software License 1.0
337 stars 84 forks source link

Memory allocation using regular repetitions. #224

Closed arondahl closed 9 months ago

arondahl commented 9 months ago

Hi,

I noticed there is a large disparity of memory use, when generating reference repetitions using perpendicular v1&v2 vectors in gdstk.Repetition() versus using vectors, which are not perpendicular. I was wondering why this is and also whether there is a work around?

Best, Aron Dahlberg

heitzmann commented 9 months ago

Are you talking about runtime memory usage or the size of the resulting GDSII file? Both are expected to be larger in the non-orthogonal case, but the largest difference will be in the saved file, because the GDSII format does not support this type of array.

arondahl commented 9 months ago

Hi, I was talking about the size of resulting GDSII file.

heitzmann commented 9 months ago

Yes, in that case you have to use the OASIS format to see any gain.