Improve multi-threaded performance