Hi there! I been reading all around about running ruby scripts on SketchUp (SU2017 in my case) but, ultimately, I have found no solution to one last problem I have so I come here to ask all the gurus from whom I have learned so far.
I have some huge code that loads different objects (as components), transforms and mixes them up creating some random virtual environment defined by some simple parameters, e.g., given house layout and dimensions it could generate a complete house model with furniture, wall textures and such.
However, process time does not seem to escalate linearly with (following the previous example) rooms. Say, if I want to generate a room with random furniture and textures it would take from 1 to 10 seconds but if I want 2 rooms it just does not take twice the time (consider there is no interaction between rooms, i.e., they are generated independently).
As far as I have seen, If I add/create more entities in a single script the time and memory usage needed to complete the full process explodes (SketchUp does not slow down my computer, just uses more and more of my hard drive). I could always just run a code that creates a room, wait, run again to create another, wait, etc, but I’m guessing its not the idea, I may just be doing something wrong.
I just recently tried embedding the script inside a start_operation/commit_operation but it still takes too long for the amount of entities I want to handle at the same time. Is there a better/cleve/magical way to generate a huge model like this or is this proper/expected behavior?
Thanks in advance for any insight, solution or help provided!