minad / consult

:mag: consult.el - Consulting completing-read
GNU General Public License v3.0
1.12k stars 98 forks source link

[Q/Bug] consult-grep (with ripgrep or ugrep) is slower than counsel-rg #950

Closed NightMachinery closed 2 months ago

NightMachinery commented 2 months ago

counsel-rg is much faster than consult. In fact, counsel-rg mostly feels realtime to me (especially when the query has more than around 10 characters)(without the consult-async-split-style hack), while consult is very slow. Typing a character takes around a second to update the result on an M2 Macbook.

(counsel-rg query dir args (or prompt "> "))
(consult--grep
       (or prompt engine)
       #'consult--ripgrep-make-builder
       dir
       query)

I have used consult with ugrep as well, and that also has this problem. This makes me believe that the bottleneck is with consult itself.

Perhaps using --null is expensive?