:tools biblio makes loading org much slower
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### I confirm that...
- [X] I have searched the [issue tracker](https://github.com/doomemacs/doomemacs/issues), [documentation](https://docs.doomemacs.org), [FAQ](https://docs.doomemacs.org/-/faq), [Discourse](https://discourse.doomemacs.org), and [Google](https://google.com), in case this issue has already been reported/resolved.
- [X] I have read "[How to Debug Issues](https://doomemacs.org/d/how2debug)", and will use it to provide as much information about this issue as possible.
- [X] The issue can be reproduced on the **latest** available commit of Doom.
- [X] The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. *(Unstable versions end in .50, .60, or .9x)*
### Expected behavior
With `:tools biblio`, Emacs loads `org.el` as fast as without the enabling the module.
### Current behavior
Enabling `:tools biblio` makes loading `org.el` noticeably slower.
`(benchmark-progn (require 'org))` takes much more time. On vanilla Doom:
```
Elapsed time: 0.328472s (0.040887s in 1 GCs) ;; becomes
Elapsed time: 0.574496s (0.040469s in 1 GCs)
```
And it's far worse in my config:
```
Elapsed time: 0.832266s (0.040597s in 1 GCs) ;; becomes
Elapsed time: 4.864657s (0.603091s in 12 GCs)
```
I found that it's because of those 3 lines in [biblio/config.el](https://github.com/doomemacs/doomemacs/blob/986398504d09e585c7d1a8d73a6394024fe6f164/modules/tools/biblio/config.el#L80):
```elisp
;; `org-cite' processors
(use-package! oc-biblatex :after oc)
(use-package! oc-csl :after oc)
(use-package! oc-natbib :after oc)
```
Just commenting out them can bring the load time to nearly equal to disabling the module altogether.
### Steps to reproduce
1. Open a new Emacs session
2. Enable `:tools biblio` in init.el, sync and open another session
3. Evaluate `(benchmark-progn (require 'org))`
### System Information
https://pastebin.com/9b90XPSK
Contributor guide
Assessment
This issue has not been assessed yet.