autoformat has performance issue