Grasshopper Parallel Graft and Flatter

Hi,

I would like to ask about parallel computing in grasshopper components

I have a simple case 30 closed polylines.


.Graft.gh (9.4 KB)

When I graft them creating, planar surface is very slow.
When I have a flattened list, planar surface works fast.

Does it mean: When datatrees have fewer elements and in has lots of branches it is better not to use paralell?

Also in general when datatrees have lots of branches, does the calculation inside component slows down or it is just for parallel case?

what is the difference in absolute time? (not percentages)
this might be misleading if the times are a few milliseconds.

Is it possible to show this in rhino6 grasshopper?
Before it was profiler, and for which option should I use ms?

Just for human perspective when I change those polylines and I see that it is slower.

just double click on the time and it toggles.

Btw, I’m waiting eagerly to hear the answer to your question about the way the solver handles these operations.

No. The difference in performance is due to the fact that different code runs if there’s only a single curve and it’s a closed polyline with only 3 or 4 corners. In these cases the surface gets constructed directly from the corner points, resulting in either untrimmed or minimally trimmed surfaces.

It is an unexpected difference though, I’ll have to look into it, see why it’s so much slower.

Update, it’s just the extra work involved in the parallel option. There’s some extra work for every iteration and if you graft the input then there’s some extra work multiplied by the number of items.

So I guess just disabling the parallel computation is the easiest solution here.

Yes disabling help a lot.

Would it be possible to get some references or examples how parallel computing is done in gh components?