Method 'acquire' of '_thread.lock' taking 90% of time

This is entirely expected: snakeviz/profile only looks at what your main thread is doing, but all of the compute work is happening in other threads, so it just shows “wait”. This is one of the reasons to use distributed even just locally (LocalCluster), because it gives much better diagnostic information.

There are some tools available for diagnostics without distributed, but you need to opt in to using them - see the docs.

2 Likes