rofic · 2022-04-03 18:54
Do things like literate config (with org-babel) and not using lazy loading (e.g. via `use-package`) only affect startup performance (which is irrelevant if using --daemon which I assume you should) or is there an effect on performance (however little) that may be persistent for normal usage? E.g. ITheoretically in an Emacs config with 1,000,000 lines of code, is it simply loading an entire config into memory on startup and the resulting performance is the same? If memory is a constraint, will simply increasing the threshold be a solution (which is hardly a cost on a desktop PC)?
BettaGeorge · 2022-04-03 19:10
I do not quite understand your question. Literate config just means you write your config as an org file and on startup it gets converted to a regular old .el file that is then read. Literate programming is for the benefit of the programmer.
deaddyfreddy · 2022-04-03 21:44
no need to tangle config on every startup, you can do it while saving
hmeh922 · 2022-04-04 00:51
I don’t tend to restart emacs unless I am working on my emacs config. I do that a lot. So that’s why I care about startup time (deferring packages). I also eagerly load all my other packages in the order they were previously loaded in while idle so I get the best of both worlds.
As others have mentioned, literate is just for the dev and has nothing to do with perf.
TheFrenchPoulp · 2022-04-04 10:07
I usually recommend doing it on startup actually, since it can take a couple seconds for larger files. My setup only tangles when the `.org` is newer than the `.el` however.
deaddyfreddy · 2022-04-04 11:22
> I usually recommend doing it on startup actually, since it can take a couple seconds for larger files.
I use
;; Local Variables:
;; eval: (add-hook 'after-save-hook (lambda () (let ((inhibit-redisplay t) (inhibit-message t) (emacs-lisp-mode-hook '())) (org-babel-tangle))) nil t)
;; End:
;;; init.el ends here
so it tangles a 2kLoC in less than a second (only if the file is changed)
weevyl · 2022-04-04 19:00
Same here. Startup when it needs to tangle an org file adds a couple of seconds if the .org file needs to be tangled again.