Excluding files from index

Is it possible to exclude a particular directory/files from being indexed?

I've found it is possible to exclude directory from the project so it was hidden, but is it possible just to exclude it from indexing process? So I could see it in the project tree and traverse over it, but IDE wouldn't waste CPU/memory indexing it (the files there is a part of temporary files in a building process)

7 comments
Comment actions Permalink

Hi Ivan,

Exclude from indexing without excluding it completely -- no, you cannot really do this (unless all files have different extension(s) that can be treated as "Text files"). There is "Mark as plain text" command that can be applied to any file (so file is treated as plain text -- no syntax highlighting, no inspections etc), but such command cannot be applied to folders unfortunately (there is a ticket about this)

You can, however, disable all inspections in such files/folders. If that is acceptable then see this thread: http://devnet.jetbrains.net/thread/437829?tstart=0 (P.S. Please note that you have to apply this for every inspection you want to omit).

1
Comment actions Permalink

I have the same problem nearly 8 years later with phpstorm 2020.1:

I am responsible for a project at our university which has more than a million files in a folder within the web root of the project.

A copy of this folder is stored on a encrypted harddisk in my local dev environment and I have a included it with a symlink into the project on my (too small) internal drive. The folder is excluded in the PhpStorm-settings, but it seems as if it is indexed nevertheless: Every PhpStorm index process takes ages with intense HDD access, the PhpStorm cache is arround 30GB big.

So is there another setting I have to configure besides excluding to stop indexing this folder (there is no need to find the content of the folder within the IDE)?

Thanks,

Rob

 

0
Comment actions Permalink

Rob, you may try disabling the following option in Registry (Search Everywhere > "Registry"): 'indexer.follows.symlinks'

Honestly speaking, I am not sure if it is still working in 2020.1 but worth a shot.

0
Comment actions Permalink

Vasiliy, thanks for the hint (I wasn´t even aware of a registry in phpstorm). Unfortunatelly it doesn´t change anything, the index process still scans the files on my external HDD to index them

0
Comment actions Permalink

Rob, thank you for trying this option. I am afraid, there is nothing else we can do here, please follow this YouTrack ticket, it seems to be pretty similar to your scenario:

https://youtrack.jetbrains.com/issue/IDEA-189247

0
Comment actions Permalink

Yes, this seems to be exactly the corresponding bug to my issue. Would be nice if this could be fixed :-)

0

Please sign in to leave a comment.