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

Huge startup perfomance impact #1182

Closed
bomgar opened this issue Oct 9, 2017 · 4 comments
Closed

Huge startup perfomance impact #1182

bomgar opened this issue Oct 9, 2017 · 4 comments

Comments

@bomgar
Copy link

bomgar commented Oct 9, 2017

Expected behavior

Emacs startup is fast

Actual behavior

Startup emacs (with working_dir=home which is default if started via dmenu) does a lot of IO and takes a long while

Steps to reproduce the problem

Start emacs. The projectile project type display for the scratchpad takes a really long time.

Commit

Commit 561d5aa seems to be causing this. If i checkout the revision before that the problem is gone.

(defun projectile-go-project-p ()
  "Check if a project contains Go source files."
  (cl-some
   (lambda (file)
     (string= (file-name-extension file) "go"))
(projectile-current-project-files)))

This might be the problem but I'm not sure. projectile-current-project-files needs to load all files in my home directory.

Strace shows that the emacs project loads a lot of files on startup. The startup time is probably dependant on the size of the home directory.

Emacs version

25.3

Operating system

Manjaro Linux

@bomgar
Copy link
Author

bomgar commented Oct 9, 2017

Adding this to my config solves the problem:

  (setq projectile-mode-line
        '(:eval (format " Projectile[%s]"
                        (projectile-project-name))))

@fbertux
Copy link

fbertux commented Oct 9, 2017

@bomgar

Yes, this work to me. Without this code is impossible to work with projectile enable.

@mriehl
Copy link

mriehl commented Oct 9, 2017

Same, thanks for the workaround. Strangely the commandline emacs (emacs -nw) starts up quickly, but then slows down to a crawl (feels like it's wading through home in the background) while the ui emacs (emacs) seems to do this synchronously and blocks rendering until it's done searching through my home.

@fbertux
Copy link

fbertux commented Oct 9, 2017

I'm using emacs -nw too and startup time is normal, but is very slow to navigate on code with C-p C-n

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

3 participants