{"version":"2.1.332","anchor":"grep-bounded-top-n-sorting-and-large-line-handling","canonical_anchor":"grep-bounded-top-n-sorting-and-large-line-handling","heading":"Grep handles large result sets and very long lines faster","tier":"notice","area":"Grep Tool","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332\/e\/grep-bounded-top-n-sorting-and-large-line-handling","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332","markdown":"### Grep handles large result sets and very long lines faster\n\nGrep now keeps only the top results instead of sorting everything, and replaces very long one-line matches with dots\n\n**What**\n\nThe Grep tool, which searches files for text, has changed how it handles results:\n\n- Sorting: it now keeps only as many top results as it needs, and sorts all of them only when there are fewer than four times that number. Before, it always sorted every result.\n\n- Counting: the way it counts matched lines in the output of ripgrep, the search program it uses, has been reworked.\n\n- Long lines: a match on a single very long line is replaced with dots.\n\n**Why**\n\nSearches in large projects should finish faster and return a more limited set of results. Results that rank equally may come back in a slightly different order than before.\n\n- Area: Grep Tool\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}