# Computational time problem

Hello everyone,

I have a trouble with computational time. I realized that grasshopper has some difficulties when I use surface trim or surface split. These operations take a lot time and gh uses only 2% of my CPU. Is there a method to make faster these operations or use more CPU? You can check only “SKIN 1” cluster. I couldn’t internalise the data, because if I’m doing it, then the gh data is bigger than 20 Mb.

Rhino 1.3dm (24.8 KB)
Rhino_simplified.gh (129.2 KB)

How many cores do you have in your machine? Typically an intense process like this would just occupy a single core for however long it takes, so if you have -say- 8 cores, that should yield 100/8 = 12.5%. 2% would imply you have 50 cores, which seems very unlikely, but I still thought I’d ask.

1 Like

I have 24 cores and 48 logical processor. It is actually a work station. But, still I have a trouble with computational time:)

Then indeed it makes sense. The majority of computational problems cannot be parallelized. An operation has to be atomic to make use of this. Slicing a surface into multiple pieces does not work in parallel if it’s the same surface. It would just work if you have 48 surfaces with x amount of unique cutter each. Baking 1 bread, is not going to be faster, just because of having 48 ovens.

Actually, I tried to open some holes on the surface. I have like 16 surfaces and have to open like 50 holes on each surface. It takes a lot time. Is there any method to do it faster? or better asked how do you design a pipe with holes without using surface trim?

Then you can call the underlying Rhinocommon functionality involved via a script and use a “Parallel.For” loop, or you create 16 Tasks/Threads and await them all. Of course, somebody has to write it… If you can do this and might just need help in parallelizing the code, then I would suggest creating a new topic. But maybe someone sees it and writes for you. Sometimes you just need to advertise a topic better to make people write you a script

I think many people have the same problem in grasshopper. Also, the code should be flexible to identfy how many pipes and holes there are, because they can be changed. The problem is, I am also new in rhino. I have only 1,5 months experience. Maybe I can write a code after one year. But, I should find a quick solution for now in order to make happy my supervisor

Yes, true. This is why Grasshopper 2.0 had to be a ground-up rewrite. Multi-threading is not something you just add to an existing code-base overnight. At least not if that code-base is C++ and C#…