Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harsh freezes if Rust project lacks .git dir #87

Closed
MageSlayer opened this issue Oct 26, 2017 · 1 comment
Closed

Harsh freezes if Rust project lacks .git dir #87

MageSlayer opened this issue Oct 26, 2017 · 1 comment

Comments

@MageSlayer
Copy link

MageSlayer commented Oct 26, 2017

Expected behavior

No freezes. Cursor movement is ok

Actual behavior

After opening Rust project without .git directory created, emacs becomes really slow

Following profile trace show helm-projectile as a cause.
- command-execute                                                3217  59%                                                                      
 - call-interactively                                            3217  59%                                                                      
  - byte-code                                                    3206  59%                                                                      
   - helm-M-x-read-extended-command                              3206  59%                                                                      
    - helm-comp-read                                             3206  59%                                                                      
     - helm                                                      3206  59%                                                                      
      - apply                                                    3206  59%                                                                      
       - helm                                                    3206  59%                                                                      
        - apply                                                  3206  59%                                                                      
         - helm-internal                                         3206  59%                                                                      
          - helm-read-pattern-maybe                              3197  59%                                                                      
           - read-from-minibuffer                                3193  59%                                                                      
            - redisplay_internal (C function)                    3148  58%                                                                      
             - eval                                              3148  58%                                                                      
              - format                                           3148  58%                                                                      
               - projectile-project-type                         3148  58%                                                                      
                - projectile-detect-project-type                 3148  58%                                                                      
                 - cl-find-if                                    3148  58%                                                                      
                  - apply                                        3148  58%                                                                      
                   - cl-find                                     3148  58%                                                                      
                    - apply                                      3148  58%                                                                      
                     - cl-position                               3148  58%                                                                      
                      - cl--position                             3148  58%                                                                      
                       - #<compiled 0x101c379>                   3148  58%                                                                      
                        - projectile-go-project-p                2967  54%                                                                      
                         - cl-some                               2967  54%                                                                      
                          - #<compiled 0x101c20b>                2963  54%                                                                      
                             file-name-extension                 2947  54%                                                                      
                        + projectile-verify-files                 181   3%                                                                      
            - timer-event-handler                                  21   0%                                                                      
             + apply                                               21   0%                                                                      
           + helm-update                                            4   0%                                                                      
          + helm-initialize                                         9   0%                                                                      
  + funcall-interactively                                          11   0%                                                                      

Steps to reproduce the problem

Just opening any Rust source file without .git subdir is enough.
I have following config.

(require 'helm-config)
(helm-mode 1)

(require 'helm-swoop)
(defmethod helm-setup-user-source ((source helm-source-multi-occur))
  (setf (slot-value source 'follow) 1))

(require 'helm-grepint)
(helm-grepint-set-default-config)
(global-set-key (kbd "C-c g") #'helm-grepint-grep)
(require 'helm-git-grep) ;; Not necessary if installed by package.el

;; Invoke `helm-git-grep' from other helm.
(eval-after-load 'helm
  '(define-key helm-map (kbd "C-c g") 'helm-git-grep-from-helm))

(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
(global-set-key (kbd "C-x b") 'helm-mini)
(global-set-key (kbd "M-s o") 'helm-occur)

(require 'helm-files)
(global-set-key (kbd "C-x C-f") 'helm-for-files)

(setq helm-ff-guess-ffap-filenames t)
(setq helm-ff-guess-ffap-urls t)

;; helm + projectile
(projectile-global-mode)
(setq projectile-enable-caching t)
(setq projectile-completion-system 'helm)
(helm-projectile-on)
(setq helm-for-files-preferred-list '(
				      helm-source-projectile-files-list
				      helm-source-projectile-recentf-list
				      helm-source-buffers-list
				      helm-source-recentf
				      helm-source-projectile-directories-list
				      helm-source-projectile-projects
				      helm-source-files-in-current-dir
				      helm-source-moccur
				      helm-source-locate
				      ))

Backtraces if necessary (M-x toggle-debug-on-error)

Environment & version information

  • helm-projectile version: 20170926.1123 from elpa
  • helm version (in helm-pkg.el): 20171023.2212 from elpa
  • projectile version (M-x projectile-version): Projectile 20171009.848
  • Emacs version (M-x emacs-version): GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.17) of 2017-08-01, modified by Debian
  • OS: Linux Devuan x64
@xiongtx
Copy link
Collaborator

xiongtx commented Mar 19, 2018

It seems that this is the same problem as bbatsov/projectile#1183, which has nothing to do w/ helm-projectile per se.

Upgrade your Projectile and see if the problem is resolved. If not, follow-up there.

@xiongtx xiongtx closed this as completed Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants