GH - Slow filtering of duplicates - How avoid making dupes?

Yes, I analyzed a bunch of contour polylines and output a bool filter for curves, line segments and the end points. However, I seem too clumsy to filter the results without multiplying then into the millions. So now I have to filter away numerous duplicates (see the black spot in the definition), a process which is terribly slow (almost a minute, while generating all the curves takes only a few seconds).

I could do all the filtering with a C# component instead in order to avoid the problem in the first place, but now I got myself curious about how I ended up multiplying so many list items.

Can anyone explain to me where I did the silly thing? Please see attached definition. (1.9 MB)

// Rolf

Well you use the boolean pattern from is inside as a pattern to feed into dispatch, but one time you graft it and one time you don’t so you get 2509² = 6.3M Lines and this makes the definition kind of slow.

Grafting the index list might or might not be what is the solution here.

Just for my understanding: You mean to check for all curves inside curves, seperate them in two lists and use different custom preview for a quick visual analasys?

Oops, there it was. “Kind of slow”, yes. And yes, grafting the dispatch output does the right thing. It must have been too late at night, or too early in the morning. :sleeping:

Thank you for finding the mishap (my bad luck happens to me only when I try to think :thinking: ).

// Rolf