[DF-3978] memory footprint and performance optimizations