Improve performance on tab completion