an attempt to fix diagram performance (IDEA-98769)