DOCS-2980 agg optimization