projectile icon indicating copy to clipboard operation
projectile copied to clipboard

Option to rebuild the cache in the background

Open vermiculus opened this issue 5 years ago • 2 comments

Howdy! As I'm sure more than a few Projectile users do, I work with very large repositories. So large that reconstructing the cache takes ...(runs time svn list -R)... 21 minutes. New files I need to access are being added regularly, so I'm finding that I need to rebuild the cache far more often than I used to. Muscle-memory kicks in and... I regularly lock up emacs for that amount of time 😄

I can do the development myself if desired, but I wanted to get your thoughts: is there any reason we can't run projectile-svn-command (or anything from projectile-indexing-method => 'alien) as a background process and consume the output when the command completes? Do you foresee any challenges?

vermiculus avatar Apr 10 '20 17:04 vermiculus

No, this shouldn't be particularly hard to achieve. The only thing we'll have to be mindful is would be not messing up with the existing cache while the rebuild operation is in progress (probably it should write some to some tmp cache that replaces that one in use). Generally your suggestions goes well with some plans I have to remove the big cache file and replace it with one cache file per project. Unfortunately I never got to working on this.

bbatsov avatar Apr 28 '20 05:04 bbatsov

I was thinking of something similar. With cache disabled, it takes several seconds for search for files to come up. If the indexing could happen in the background while I started typing, I might barely even notice it was happening.

goldfita avatar Aug 26 '22 13:08 goldfita