Has anyone tried running the pull point or curve closest point method through parallel for loops/multi threading to increase performance? the native components in gh start to get quite slow once the amount of points and curves increase.
actually tried it once in c# / vs improving the evaluation component through System.Threading.Tasks.Parallel.For() but am not very familiar with it, so am seeking for advice, and thought someone on here probably has done it already.
Attached a comparison - the ‘gh_test_1’ component implemented with the parallel method. parallel_eval_1.gh (22.0 KB)
Thanks a lot for the code!
I remember that apparently multi-threading will only work in compiled components?
See last paragraph of the first section:
I gave your component a try and compare it with native components (please find attached) -
it doesn’t seem to really be faster? Am I not understanding something correctly? multithreading_examples_V2_test.gh (14.4 KB)
And given the opportunity get this as well that is using the .AsParallel AND the .AsPointless [(C), ™, US Patent pending] things that … er … hmm … prove that hope dies last (it should die first).
…it makes some difference (on average: half the time ) … but in real-life and for real-things and for real projects (paid with real money [I do hope])… well … you get the gist I assume.