Variable: projectile-indexing-method

projectile-indexing-method is a customizable variable defined in projectile.el.

Value

alien

Documentation

Specifies the indexing method used by Projectile.

There are three indexing methods - native, hybrid and alien.

The native method is implemented in Emacs Lisp (therefore it is native to Emacs). Its advantage is that it is portable and will work everywhere that Emacs does. Its disadvantage is that it is a bit slow (especially for large projects). Generally it's a good idea to pair the native indexing method with caching.

The hybrid indexing method uses external tools (e.g. git, find, etc) to speed up the indexing process. Still, the files will be post-processed by Projectile for sorting/filtering purposes. In this sense that approach is a hybrid between native indexing and alien indexing.

The alien indexing method optimizes to the limit the speed of the hybrid indexing method. This means that Projectile will not post-process the files returned by the external commands and you're going to get the maximum performance possible. Projectile's ignore rules are still respected - they are handed to the external tool as exclusion arguments where it understands them, and applied in Emacs Lisp only for the few tools that can't express them (see projectile-alien-honors-ignores). Sorting is never applied.

The disadvantage of the hybrid and alien methods is that they are not well supported on Windows systems. That's why by default alien indexing is the default on all operating systems, except Windows.

This variable was added, or its default value changed, in projectile version 2.0.0.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defcustom projectile-indexing-method
  (if (eq system-type 'windows-nt) 'native 'alien)
  "Specifies the indexing method used by Projectile.

There are three indexing methods - native, hybrid and alien.

The native method is implemented in Emacs Lisp (therefore it is
native to Emacs).  Its advantage is that it is portable and will
work everywhere that Emacs does.  Its disadvantage is that it is a
bit slow (especially for large projects).  Generally it's a good
idea to pair the native indexing method with caching.

The hybrid indexing method uses external tools (e.g. git, find,
etc) to speed up the indexing process.  Still, the files will be
post-processed by Projectile for sorting/filtering purposes.
In this sense that approach is a hybrid between native indexing
and alien indexing.

The alien indexing method optimizes to the limit the speed
of the hybrid indexing method.  This means that Projectile will
not post-process the files returned by the external commands and
you're going to get the maximum performance possible.  Projectile's
ignore rules are still respected - they are handed to the external
tool as exclusion arguments where it understands them, and applied
in Emacs Lisp only for the few tools that can't express them (see
`projectile-alien-honors-ignores').  Sorting is never applied.

The disadvantage of the hybrid and alien methods is that they are not well
supported on Windows systems.  That's why by default alien indexing is the
default on all operating systems, except Windows."
  :group 'projectile
  :type '(choice
          (const :tag "Native" native)
          (const :tag "Hybrid" hybrid)
          (const :tag "Alien" alien))
  :safe (lambda (x) (memq x '(native hybrid alien)))
  :package-version '(projectile . "2.0.0"))