Speed optimization of Grasshopper Model

This project needs a few other components such as columns and vertical transportation structure. I have a contour icon that is extruded and capped and then I subtract the outer boundary to limit the project to the required limits. I understand the contour function has two dots at the top so it is a slow function, but I am not sure how else to optimize it. Would creating the solid slab and then arraying it vertically about Z help to optimize it? Or possibly using Pufferfish somehow?


190141350 - CW GH.gh (16.8 KB)

Thank you

Hi,

The changes I’ve made already should save you at least 3 to 4 seconds.
If you want to make it even faster, you need to come up with a way to do this without contouring, since that’s by far the slowest component in your definition.

190141350 - CW GH 2.gh (17.5 KB)

1 Like

Not much faster.

I have not seen the file, but in general: The performance of Nurbs-Intersections are also related to the underlying surface. If you deal with heavy surfaces, computations become slower just because the mathematical function underneath is more complex. Depending on what you are planing to do, you could also create the curves without intersection, by just blending("(inbe-)tweening") or morphing from some edge curves. Pufferfish offers some components for this. But last but not least, “some” seconds are not slow. Just make sure not to change your shape too often. Find the shape first, and then create the structure on it!

1 Like

@Christian_Orozco how long does the calculation of the contours take on your computer?

Hello, Thank you it does improve it a lot more so I appreciate it. However, it is still loading for at least 4 seconds, and still need to include columns, elevator core, and facade so I fear it will be a lot slower after those. Any advice maybe using Pufferfish Tweening? Linear array? Perhaps copy? Thank you for your help!

Thank you, it does improve it but not quite as much. Thank you though

@martinsiegrist Without the changes it takes around 7-10 seconds and Grasshopper crashes. With the solution devised by @diff-arch it takes 4 seconds approximately. Could it potentially be computer performance?

Yes.

I’m using a workstation with 128 GB of RAM.

Two screens on a NVIDIA RTX A5000, Memory: 24GB, Driver date: 12-29-2021 (M-D-Y).

OpenGL Ver: 4.6.0 NVIDIA 511.09

Processor: AMD Ryzen 9 5950X 16-Core, 3401 MHz

1 Like

Here’s a version takes about 1.5 seconds.

190141350 - CW GH 3.gh (28.1 KB)

No need for Pufferfish here, if you ask me.

I believe it is my computer being slow.
16 RAM
Processor Intel Core i7 1.88GHz

That’s good enough for Rhino and Grasshopper. Don’t worry!