Reduce number of goroutines and locks