Multi thread parse/DefineMesh
Posted: Thu Jan 28, 2021 2:26 am
Is there any way to do the scene Parse and/or DefineMesh from different threads at the same time?
I tried to use Mutex and Critical Section before this functions call but the performance suffers from all synchronization processes and in most cases, I didn't get any benefit from multi threads, in the best case I achieved 25% of performance.
On the other hand for the extensive process part from 3dsmax, I achieved at least 4 to 8 times better performance. considering those parts did not require too much synchronization and waiting for writing variables.
I tried to compare a few scene translation part performance with BlendLuxCore and because of the nature of the BlendLuxCore that mostly runs by the python language, the 3dsmax version has better performance, for example in my case, translation of almost 174000 objects (most of them are low poly) take around 160 seconds with Core i9 9900k and take no more than 8% of CPU usage.
Of course, the MaxToLux code needs to be optimized and it's not finished yet, as I started to code not so far and more focus on adding features that optimizing the code, and try to make it less complicated at this point, with optimized code may come better performance.
Long story short, my question is:
Is there any other solution available that anyone tried before to multi-thread these parts? or, any suggestions to put me in the right direction?
I tried to use Mutex and Critical Section before this functions call but the performance suffers from all synchronization processes and in most cases, I didn't get any benefit from multi threads, in the best case I achieved 25% of performance.
On the other hand for the extensive process part from 3dsmax, I achieved at least 4 to 8 times better performance. considering those parts did not require too much synchronization and waiting for writing variables.
I tried to compare a few scene translation part performance with BlendLuxCore and because of the nature of the BlendLuxCore that mostly runs by the python language, the 3dsmax version has better performance, for example in my case, translation of almost 174000 objects (most of them are low poly) take around 160 seconds with Core i9 9900k and take no more than 8% of CPU usage.
Of course, the MaxToLux code needs to be optimized and it's not finished yet, as I started to code not so far and more focus on adding features that optimizing the code, and try to make it less complicated at this point, with optimized code may come better performance.
Long story short, my question is:
Is there any other solution available that anyone tried before to multi-thread these parts? or, any suggestions to put me in the right direction?