[DF-3978] some performance optimizations