This is more a curiosity, than a necessity.

I'm playing around with startup times, and to have something to compare with, I wanted to see how fast emacs could start up pure.

Running emacs -Q, emacs-init-time reported 0.3~ secs on average.

With a blank config, I installed esup (Emacs Start Up Profiler), and the init.el file became:

(add-to-list 'load-path "~/.emacs.d/packages/esup-0.7")
(require 'esup)

To test it out, I launched emacs normally, and ran esup.

result of running the esup command

Huh, look that. vc-git is loaded.

Curious on how low the start up time can get, I try to disable it.

And so it begins.

To disable VC entirely, set the customizable variable vc-handled-backends to nil https://www.gnu.org/software/emacs/manual/html_node/emacs/Version-Control.html

I insert (setq-default vc-handled-backends nil) into init.el

Still being loaded.

Perhaps removing the vc entry it from load-path does the trick.

So I also add (delete "/usr/share/emacs/27.1/lisp/vc" load-path) to the config.

Still being loaded. Challenge accepted.

I try to add (add-to-list 'load-path "~/.emacs.d/overwrites") to the newly supported early-init.el config file, and add a dummy vc-git.el file into the folder specified, containing just (provide 'vc-git)

Still being loaded. Same if I move the line from early-init.el to init.el.

No effect by adding (setq-default load-suffixes '(".el")) either.

Seeing no other way to prevent it from loading, I try the nuclear option of moving the offending file /usr/share/emacs/27.1/lisp/vc/vc-git.elc temporarily.

Finally it does not load.

So it is possible.

Now I'm just wondering if it is possible without going nuclear.

For science (and negible reduced startup time)

  • 1
    Use after-load-functions to call debug -- or just throw (debug) into vc-git.el and re-compile -- and you should learn what's causing it.
    – phils
    Commented Sep 12, 2020 at 2:27
  • Thanks for the suggestion! I'll try it out after the weekend.
    – Ole
    Commented Sep 12, 2020 at 12:35
  • Interesting. I'm getting somewhere... github.com/jschaf/esup/issues/51#issuecomment-386924846
    – Ole
    Commented Sep 14, 2020 at 7:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.