CustomQueue optimization