Page MenuHome

Geometry Nodes: Multithread deleting vertex group
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jan 4 2023, 4:37 PM.

Details

Summary

Since rB78f28b55d392, allocating on multiple threads is much
faster, making it a nice improvement to parallelize vertex group
operations. This patch uses multi-threading when removing a
vertex group.

On a Ryzen 3700x:
Before: (Average: 15.6 ms, Min: 15.0 ms)
After: (Average: 8.1 ms, Min: 7.6 ms)

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jan 4 2023, 4:37 PM
Hans Goudey (HooglyBoogly) created this revision.

Just curious, can you check what the performance is with 1, 2, 4 and 8 threads? (-t 4)

Sure!

ThreadsBeforeAfter
1(Average: 15.3 ms, Min: 15.0 ms)(Average: 15.7 ms, Min: 15.3 ms)
2(Average: 15.3 ms, Min: 14.9 ms)(Average: 12.3 ms, Min: 10.7 ms)
4(Average: 15.3 ms, Min: 14.9 ms)(Average: 9.9 ms, Min: 9.1 ms)
8(Average: 15.3 ms, Min: 14.9 ms)(Average: 8.8 ms, Min: 8.3 ms)

It probably depends a fair amount on the file though. I have 250k vertices and 30 vertex groups each randomly assigned to between 10% and 50% of the total.

BTW, we could probably parallelize materialize and set_all and some other similar methods, I just didn't get to that yet.

This revision is now accepted and ready to land.Jan 4 2023, 5:17 PM