branch: externals/phpinspect
commit ae3acbdbe13f3b6cae4c968b56b33aa1d0d96566
Author: Hugo Thunnissen <de...@hugot.nl>
Commit: Hugo Thunnissen <de...@hugot.nl>

    Disable auto-reindexing by default
---
 phpinspect.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/phpinspect.el b/phpinspect.el
index fb1b59012c..fadc7a0766 100644
--- a/phpinspect.el
+++ b/phpinspect.el
@@ -42,6 +42,11 @@
 (require 'phpinspect-imports)
 (require 'phpinspect-buffer)
 
+(defvar phpinspect-auto-reindex nil
+  "Whether or not phpinspect should automatically search for new
+files. The current implementation is clumsy and can result in
+serious performance hits. Enable at your own risk (:")
+
 (defvar-local phpinspect--buffer-index nil
   "The result of the last successfull parse + index action
   executed by phpinspect for the current buffer")
@@ -1211,7 +1216,7 @@ before the search is executed."
           ;; Index new files and try again if not done already.
           (if (eq index-new 'index-new)
               nil
-            (progn
+            (when phpinspect-auto-reindex
               (phpinspect--log "Failed finding filepath for type %s. Retrying 
with reindex."
                                (phpinspect--type-name class))
               (phpinspect-get-class-filepath class 'index-new)))

Reply via email to