projectile icon indicating copy to clipboard operation
projectile copied to clipboard

question: howto avoid slow nfs mount acceses

Open soundart opened this issue 1 year ago • 3 comments

Hi,

I am using doom emacs and projectile is a deeply integrated part. Currently I have some very large and very slow filesystems mounted to /project over nfs.

I have a cmake based project which symlinks directories into subtrees of the slow filesystems.

When I try to open a small c++ header file on my laptops ssd emacs spawns a subprocess.

fdfind . -0 -H --color=never --type file --type symlink --follow --exclude .git --strip-cwd-prefix

and this runs for a very long time >20min (then I killed it) and walks over subtrees of the symlinked directories (checked via strace -f -p pid).

Projectile seems to initialize its cache.

The problematic item seems to be ---follow. I added "/project" to projectile-globally-ignored-directories but this did not help.

Is there a way to force the projectile cache to stay on the same file system?

Expected behavior

Allow me to open a file in a few seconds.

Actual behavior

takes too long.

Steps to reproduce the problem

mount something large and slow to /project. Hace a projectile project on a fast SSD (/home/me/work) and symlink to a directory inside the slow mount.

''' cd /home/me/work ln -s /project/big big touch .projectile touch hi.h emacs hi.h """

projectile needs to be active as in doom emacs. I do not know how that is done excatly.

Environment & Version information

Projectile version information

~/.emacs.d/.local/straight/repos/projectile$ git log commit e45f0b0cc43fdc066e7971ff3ed3bf4c78015ed0 (HEAD -> master, replaced) Author: Bozhidar Batsov [email protected] Date: Mon Feb 5 12:21:51 2024 +0200

Add support for Eask projects

Eask is a drop-in alternative of Cask.
Projectile 2.8.0

Emacs version

GNU Emacs 29.2

Operating system

$ cat /etc/debian_version 12.5

soundart avatar Mar 06 '24 11:03 soundart

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding!

github-actions[bot] avatar Jan 20 '25 01:01 github-actions[bot]

Projectile seems to initialize its cache.

I've recently reworked the cache, so it's per project and loaded later, but the init step for any project would be just as slow as before. I'm guessing that if you're not working on a big project you can just disable it.

We can potentially make configurable were the cache should be, but I think this will likely be an overkill for most people.

bbatsov avatar Jan 30 '25 16:01 bbatsov

I guessing changing this to something else might be your best best:

fdfind . -0 -H --color=never --type file --type symlink --follow --exclude .git --strip-cwd-prefix

bbatsov avatar Jan 30 '25 16:01 bbatsov