Skip to content

Using rg inside mounted dir via sshfs. #1619

Discussion options

You must be logged in to vote

In absolute terms, absolutely, it is expected. Consider what sshfs is doing: instead of reading file metadata from your local disk, it has to read that metadata over a network. Depending on your network latency, this could be significantly slower.

If you run rg --files twice in a row on an sshfs mounted directory, the second run may be faster due to the file metadata being cached in memory on your local system. For this reason, it's hard to do proper speed comparisons. If you're on Linux, then you can clear your local system's file cache with the following command:

$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'

That should then cause rg --files to run more slowly again.

The more releva…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ApplicationDeveloper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants