bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44983: Truncate long lines of grep output


From: Dmitry Gutov
Subject: bug#44983: Truncate long lines of grep output
Date: Thu, 10 Dec 2020 22:48:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 10.12.2020 10:18, Juri Linkov wrote:
BTW, for sorting currently xref-search-program-alist uses:
      "| sort -t: -k1,1 -k2n,2"
but fortunately ripgrep has a special option to do the same with:
      "--sort path"
Somehow, that option came out to be consistently slower in my
benchmarking. Even when the results are only a few lines (that's actually
when the difference should be most apparent, because with many lines Elisp
takes up the most of CPU time). You can try it yourself:

(benchmark 10 '(project-find-regexp ":package-version '(xref"))

   0.86 with '| sort'
   1.33 with '--sort path'
I confirm that in my tests '--sort path' is 2 times slower than '| sort'.

And that's because '--sort path' forces single-threaded mode: https://github.com/BurntSushi/ripgrep/issues/152





reply via email to

[Prev in Thread] Current Thread [Next in Thread]