Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This can happen because rg searches files in parallel, so the order in which it finishes the files can be nondeterministic. If you run with -j1 (single-threaded) then it is deterministic.

To get deterministic output in multi-threaded mode, rg could wait and buffer the output until it can print it in sorted order. This might increase memory usage, and possibly time, though I think the increase would be minor.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: