Use cached priority queue instead of recalculating the priorities every time.
Unsynchronize getting priority.