1

I am using Doom in MS Windows with Emacs 27.2. I am experiencing some very slow start-up times (I included the output of benchmark-init/show-duration-tree at the end).

Also, the first actions I perform after start-up (opening org-agenda and my general Org file) seem to take longer than other similar actions later (the next files I open, although still take a long time, it is considerably faster).

This is a company laptop so I can't use WSL, and I installed git and Emacs without admin rights in my local user space. In a conversation with the IT technician he mentioned that software installed without admin rights doesn't have access to the registry, and that sometimes causes the software to slow down or present some weird minor bugs.

I really don't understand much of Windows, so I can't judge how that could interfere with Emacs performance. I do have a similar init in my personal Debian machine, and it starts super fast. And I actually removed lots of packages from this init already.

So my question is: is is possible that reinstalling Emacs and git with admin rights could speed up things?

╼►[benchmark-init/root nil 165950ms]
  ├─[evil-collection-ivy require 8ms]
  ├─[ivy-avy require 1375ms]
  ├─[ivy-rich require 1355ms]
  ├─[counsel require 1489ms]
  │ ├─[xdg require 1672ms]
  │ ├─[xref require 347ms]
  │ │ ├─[ivy-xref require 693ms]
  │ │ ├─[evil-collection-xref require 4ms]
  │ │ ╰─[project require 1397ms]
  │ ├─[dired require 1398ms]
  │ │ ├─[evil-collection-dired require 4ms]
  │ │ ╰─[dired-loaddefs require 1468ms]
  │ ├─[compile require 1363ms]
  │ │ ╰─[evil-collection-compile require 4ms]
  │ ╰─[swiper require 1094ms]
  ├─[delsel require 1158ms]
  ├─[ivy-faces require 1062ms]
  ├─[ivy-overlay require 1012ms]
  ├─[colir require 1112ms]
  │ ╰─[color require 1212ms]
  ├─[evil-easymotion require 1022ms]
  │ ╰─[avy require 440ms]
  ├─[filenotify require 1431ms]
  ├─[list-utils require 155ms]
  ├─[pcache require 166ms]
  │ ╰─[eieio-base require 1346ms]
  ├─[unicode-fonts require 1103ms]
  ├─[face-remap require 1218ms]
  ├─[~/.emacs.d/.local/straight/build-27.2/doom-themes/doom-molokai-theme load 132ms]
  │ ╰─[doom-themes require 1104ms]
  │   ╰─[doom-themes-base require 1111ms]
  ├─[doom-modeline-segments require 1256ms]
  │ ╰─[doom-modeline-env require 992ms]
  ├─[doom-modeline-core require 1167ms]
  │ ├─[shrink-path require 649ms]
  │ │ ╰─[rx require 1327ms]
  │ ╰─[all-the-icons require 1166ms]
  │   ├─[all-the-icons-faces require 1297ms]
  │   ├─[data-material require 1531ms]
  │   ├─[data-weathericons require 1550ms]
  │   ├─[data-octicons require 1510ms]
  │   ├─[data-fileicons require 1496ms]
  │   ├─[data-faicons require 1320ms]
  │   ╰─[data-alltheicons require 1312ms]
  ├─[~/.doom.d/custom.el load 19ms]
  │ ├─[evil-goggles require 1129ms]
  │ │ ╰─[pulse require 1399ms]
  │ ╰─[midnight load 2075ms]
  ├─[~/.doom.d/config load 1586ms]
  │ ├─[pythonic require 39ms]
  │ │ ╰─[python require 3399ms]
  │ │   ├─[conda require 481ms]
  │ │   │ ╰─[pythonic require 39ms]
  │ │   │   ╰─[f require 310ms]
  │ │   ├─[pyvenv require 361ms]
  │ │   │ ╰─[eshell require 1329ms]
  │ │   │   ├─[esh-help require 1009ms]
  │ │   │   │ ├─[man require 2284ms]
  │ │   │   │ │ ╰─[evil-collection-man require 6ms]
  │ │   │   │ ╰─[em-unix require 2131ms]
  │ │   │   ├─[eshell-z require 1350ms]
  │ │   │   │ ╰─[em-dirs require 1600ms]
  │ │   │   │   ╰─[esh-var require 1467ms]
  │ │   │   ├─[evil-collection-eshell require 7ms]
  │ │   │   │ ╰─[em-prompt require 1536ms]
  │ │   │   │   ╰─[esh-mode require 1610ms]
  │ │   │   │     ╰─[eshell-did-you-mean require 1441ms]
  │ │   │   ├─[esh-cmd require 1279ms]
  │ │   │   │ ╰─[esh-ext require 1359ms]
  │ │   │   │   ╰─[esh-opt require 1373ms]
  │ │   │   ├─[esh-proc require 1300ms]
  │ │   │   │ ╰─[esh-io require 1337ms]
  │ │   │   │   ╰─[esh-arg require 1314ms]
  │ │   │   ├─[esh-module require 1310ms]
  │ │   │   │ ╰─[esh-groups load 1726ms]
  │ │   │   ╰─[esh-util require 1270ms]
  │ │   ├─[smartparens-config require 1101ms]
  │ │   │ ├─[smartparens-text require 1067ms]
  │ │   │ ╰─[smartparens-python require 1083ms]
  │ │   ├─[help-mode require 1261ms]
  │ │   ├─[evil-collection-python require 5ms]
  │ │   ├─[evil-collection-custom require 4ms]
  │ │   │ ╰─[cus-edit require 1716ms]
  │ │   │   ├─[cus-start require 1651ms]
  │ │   │   ├─[cus-load require 1539ms]
  │ │   │   ╰─[wid-edit require 1572ms]
  │ │   ├─[evil-collection-comint require 5ms]
  │ │   ├─[annalist require 119ms]
  │ │   ├─[tramp-sh require 1269ms]
  │ │   │ ╰─[tramp require 2492ms]
  │ │   │   ├─[tramp-loaddefs require 1362ms]
  │ │   │   ├─[trampver require 3746ms]
  │ │   │   ├─[tramp-integration require 2552ms]
  │ │   │   ╰─[tramp-compat require 1387ms]
  │ │   │     ├─[parse-time require 1298ms]
  │ │   │     │ ╰─[iso8601 require 1475ms]
  │ │   │     │   ╰─[time-date require 1330ms]
  │ │   │     ├─[format-spec require 1156ms]
  │ │   │     ╰─[auth-source require 1411ms]
  │ │   │       ├─[eieio require 1307ms]
  │ │   │       │ ╰─[eieio-core require 1403ms]
  │ │   │       │   ╰─[eieio-loaddefs require 1247ms]
  │ │   │       ╰─[password-cache require 1378ms]
  │ │   ╰─[json require 1228ms]
  │ │     ╰─[map require 1303ms]
  │ ├─[s require 254ms]
  │ ├─[dash require 290ms]
  │ ╰─[modus-themes require 583ms]
  ├─[persp-mode require 914ms]
  ├─[~/.emacs.d/modules/config/default/config load 9ms]
  │ ╰─[~/.emacs.d/modules/config/default/+evil load 5ms]
  │   ╰─[~/.emacs.d/modules/config/default/+evil-bindings load 52ms]
  ├─[~/.emacs.d/modules/lang/sh/config load 6ms]
  ├─[~/.emacs.d/modules/lang/python/config load 28ms]
  ├─[~/.emacs.d/modules/lang/org/config load 1270ms]
  │ ╰─[~/.emacs.d/modules/lang/org/contrib/pandoc load 8ms]
  ├─[~/.emacs.d/modules/lang/markdown/config load 5ms]
  ├─[~/.emacs.d/modules/lang/latex/config load 7ms]
  │ ╰─[~/.emacs.d/modules/lang/latex/+ref load 6ms]
  ├─[~/.emacs.d/modules/lang/ess/config load 5ms]
  ├─[~/.emacs.d/modules/lang/emacs-lisp/config load 8ms]
  ├─[~/.emacs.d/modules/tools/magit/config load 26ms]
  ├─[~/.emacs.d/modules/tools/lookup/config load 5ms]
  ├─[~/.emacs.d/modules/tools/eval/config load 5ms]
  ├─[~/.emacs.d/modules/tools/debugger/config load 7ms]
  ├─[~/.emacs.d/modules/checkers/syntax/config load 5ms]
  ├─[~/.emacs.d/modules/term/eshell/config load 6ms]
  ├─[~/.emacs.d/modules/emacs/vc/config load 7ms]
  ├─[~/.emacs.d/modules/emacs/undo/config load 6ms]
  ├─[~/.emacs.d/modules/emacs/ibuffer/config load 1204ms]
  ├─[~/.emacs.d/modules/emacs/electric/config load 5ms]
  ├─[~/.emacs.d/modules/emacs/dired/config load 13ms]
  ├─[~/.emacs.d/modules/editor/word-wrap/config load 6ms]
  ├─[~/.emacs.d/modules/editor/snippets/config load 6ms]
  ├─[~/.emacs.d/modules/editor/multiple-cursors/config load 11ms]
  ├─[~/.emacs.d/modules/editor/fold/config load 7ms]
  ├─[~/.emacs.d/modules/editor/file-templates/config load 5ms]
  ├─[~/.emacs.d/modules/editor/evil/config load 59ms]
  │ ╰─[evil require 1033ms]
  │   ├─[evil-integration require 1006ms]
  │   ├─[evil-maps require 998ms]
  │   ├─[evil-commands require 994ms]
  │   │ ├─[reveal require 1190ms]
  │   │ ├─[flyspell require 1225ms]
  │   │ │ ╰─[ispell require 1249ms]
  │   │ ├─[evil-jumps require 889ms]
  │   │ ╰─[evil-command-window require 863ms]
  │   ├─[evil-types require 1000ms]
  │   ├─[evil-search require 885ms]
  │   │ ╰─[evil-ex require 867ms]
  │   │   ╰─[shell require 1157ms]
  │   │     ├─[pcomplete require 1407ms]
  │   │     ╰─[comint require 1255ms]
  │   │       ╰─[ansi-color require 1325ms]
  │   ├─[evil-macros require 886ms]
  │   ├─[evil-repeat require 857ms]
  │   ├─[evil-states require 886ms]
  │   ├─[evil-core require 1026ms]
  │   ├─[evil-common require 899ms]
  │   │ ├─[windmove require 1228ms]
  │   │ ├─[calc require 1324ms]
  │   │ │ ├─[calc-loaddefs.el load 1845ms]
  │   │ │ ╰─[calc-macs require 1236ms]
  │   │ ├─[thingatpt require 1152ms]
  │   │ ├─[rect require 1207ms]
  │   │ ╰─[evil-digraphs require 876ms]
  │   ╰─[evil-vars require 2220ms]
  ├─[~/.emacs.d/modules/ui/zen/config load 8ms]
  ├─[~/.emacs.d/modules/ui/workspaces/config load 10ms]
  ├─[~/.emacs.d/modules/ui/window-select/config load 10ms]
  ├─[~/.emacs.d/modules/ui/vi-tilde-fringe/config load 14ms]
  ├─[~/.emacs.d/modules/ui/vc-gutter/config load 7ms]
  ├─[~/.emacs.d/modules/ui/unicode/config load 14ms]
  ├─[~/.emacs.d/modules/ui/treemacs/config load 9ms]
  ├─[~/.emacs.d/modules/ui/popup/config load 27ms]
  │ ╰─[~/.emacs.d/modules/ui/popup/+hacks load 42ms]
  ├─[~/.emacs.d/modules/ui/ophints/config load 8ms]
  ├─[~/.emacs.d/modules/ui/modeline/config load 11ms]
  ├─[~/.emacs.d/modules/ui/indent-guides/config load 6ms]
  ├─[~/.emacs.d/modules/ui/hl-todo/config load 8ms]
  ├─[~/.emacs.d/modules/ui/emoji/config load 7ms]
  ├─[~/.emacs.d/modules/ui/doom-quit/config load 6ms]
  ├─[~/.emacs.d/modules/ui/doom-dashboard/config load 2408ms]
  ├─[~/.emacs.d/modules/ui/doom/config load 5ms]
  ├─[~/.emacs.d/modules/completion/ivy/config load 1384ms]
  │ ╰─[kmacro require 1458ms]
  ├─[~/.emacs.d/modules/config/default/init load 9ms]
  ├─[~/.emacs.d/modules/lang/sh/init load 10ms]
  ├─[~/.emacs.d/modules/lang/python/init load 8ms]
  ├─[~/.emacs.d/modules/lang/org/init load 8ms]
  ├─[~/.emacs.d/modules/lang/markdown/init load 9ms]
  ├─[~/.emacs.d/modules/lang/latex/init load 7ms]
  ├─[~/.emacs.d/modules/lang/ess/init load 8ms]
  ├─[~/.emacs.d/modules/lang/emacs-lisp/init load 6ms]
  ├─[~/.emacs.d/modules/tools/magit/init load 7ms]
  ├─[~/.emacs.d/modules/tools/lookup/init load 8ms]
  ├─[~/.emacs.d/modules/tools/eval/init load 7ms]
  ├─[~/.emacs.d/modules/tools/debugger/init load 7ms]
  ├─[~/.emacs.d/modules/checkers/syntax/init load 8ms]
  ├─[~/.emacs.d/modules/term/eshell/init load 9ms]
  ├─[~/.emacs.d/modules/emacs/vc/init load 8ms]
  ├─[~/.emacs.d/modules/emacs/undo/init load 8ms]
  ├─[~/.emacs.d/modules/emacs/ibuffer/init load 7ms]
  ├─[~/.emacs.d/modules/emacs/electric/init load 8ms]
  ├─[~/.emacs.d/modules/emacs/dired/init load 7ms]
  ├─[~/.emacs.d/modules/editor/word-wrap/init load 8ms]
  ├─[~/.emacs.d/modules/editor/snippets/init load 7ms]
  ├─[~/.emacs.d/modules/editor/multiple-cursors/init load 7ms]
  ├─[~/.emacs.d/modules/editor/fold/init load 7ms]
  ├─[~/.emacs.d/modules/editor/file-templates/init load 7ms]
  ├─[~/.emacs.d/modules/editor/evil/init load 7ms]
  ├─[~/.emacs.d/modules/ui/zen/init load 7ms]
  ├─[~/.emacs.d/modules/ui/workspaces/init load 7ms]
  ├─[~/.emacs.d/modules/ui/window-select/init load 6ms]
  ├─[~/.emacs.d/modules/ui/vi-tilde-fringe/init load 7ms]
  ├─[~/.emacs.d/modules/ui/vc-gutter/init load 7ms]
  ├─[~/.emacs.d/modules/ui/unicode/init load 7ms]
  ├─[~/.emacs.d/modules/ui/treemacs/init load 7ms]
  ├─[~/.emacs.d/modules/ui/popup/init load 7ms]
  ├─[~/.emacs.d/modules/ui/ophints/init load 7ms]
  ├─[~/.emacs.d/modules/ui/modeline/init load 7ms]
  ├─[~/.emacs.d/modules/ui/indent-guides/init load 7ms]
  ├─[~/.emacs.d/modules/ui/hl-todo/init load 8ms]
  ├─[~/.emacs.d/modules/ui/emoji/init load 7ms]
  ├─[~/.emacs.d/modules/ui/doom-quit/init load 7ms]
  ├─[~/.emacs.d/modules/ui/doom-dashboard/init load 7ms]
  ├─[~/.emacs.d/modules/ui/doom/init load 8ms]
  ╰─[~/.emacs.d/modules/completion/ivy/init load 7ms]

1 Answer 1

0

This looks like a combination of problems.

Firstly, Doom Emacs has a design flaw where it calls require on a slew of packages at startup, defeating Emacs’ own autoload feature that will transparently load those packages only once they are actually used. I don’t think this is something you can configure. You would need to remove that code from Doom in order to mitigate the problem.

But you also say that loading an org-mode file takes a long time the first time. org-mode isn’t shown in the profile data you captured, so it isn’t being required at startup by Doom. Instead Emacs is autoloading it as intended. The fact that it is still slow is a good indication that there is a problem with your computer. It really looks like the disk you have stored Emacs on is very, very slow. It is apparently at least 100× slower than the average mechanical hard drive would be. Perhaps it is a network share? Accessing files over a slow or lossy network (especially mobile broadband or even wifi), can really slow things down.

I don’t use Windows, so I don’t know how often the Windows version of Emacs accesses the registry. In principle it could be accessing the registry every time it loads a package, but I doubt it. In any case, you can use the Sysinternals Process Monitor tool to capture a trace of every file and registry key that Emacs accesses. I believe it also records how long each one took, so you should be able to use it to figure out whether it is a problem with the registry or not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.