Optimization of tasksSortingEffect.