optimize array append in MessageFormatter