Fix performance issue for selecting ant