Speed up GUI when making large number of objects


#1

So I’m currently trying to generate a 240x240 grid of rectangles to use later in an optimization process. But when I try and generate these rects from an lsf file Lumerical FDTD slows down considerably. I’ve tried following steps from this post, like turning off the view windows and setting the graphical detail to 0 and the rendering to wireframe, but the generation of these rectangles still takes forever. Is there a better way to get around this?

Thanks


#2

Hi @ydahmani

Thank you for reaching out. Can you please clarify whether the process is slow when the view windows are off and you are only running your script or it is slow when you want to view them in CAD environment? Also, if you can upload the related files or scripts, I can take a look and see if I can be of any help.


#3

The process is slow even when the view windows are off. I tried also running from terminal in -nw mode but FDTD solutions never opens (gets stuck I think trying to generate the squares). Attached are the fsp file and lsf script as well as the mat file that I’m getting the data from. Any help would be much appreciated thanks!binarySquareArray.mat (2.9 KB)
AdjointSimTest.fsp (249.0 KB)
generate_binary_grating.lsf (912 Bytes)


#4

Hi @ydahmani
Thank you for providing the files. Generally speaking, the GUI slows down when you have many objects (57600 in your case). I took a look at your script and it looks you are creating rectangles with similar geometries and fixed period. A good way to speed up the process would be to use Array as in the screenshot after you created the first object:

Alternatively you can use copy in the scripting language as explained in our Knowledge Base page here. Make sure that you set the render type to wireframe and detail to 0 in Graphical rendering to even speed up the process.

My colleague @fgomez has a nicely written code in our Knowledge Exchange page if you plan to specify name (or other properties) of an object in your array. This code would be a good starting point for you and you can modify it for your own use.
I hope this was helpful.