My org-capture
takes about 6 seconds to open up on a reasonably powerful machine, and it becomes over a minute on a cheap laptop. I decided to profile the function and here's what it gave:
2423 97% - command-execute
2375 95% - call-interactively
2302 92% - funcall-interactively
2299 92% - org-capture
2246 90% - org-store-link
1473 59% - elfeed-link-store-link
1473 59% + byte-code
772 31% - org-load-modules-maybe
596 23% + require
53 2% - org-capture-select-template
53 2% + org-mks
3 0% - execute-extended-command
3 0% + apply
73 2% - byte-code
73 2% + read-extended-command
31 1% - autoload-do-load
16 0% byte-code
12 0% + provide
2 0% + #<compiled 0x1e082d37a5ffac44>
1 0% + do-after-load-evaluation
62 2% + ...
It happens that every time
org-store-link
is called,elfeed-link-store-link
registered as one oforg-link-parameters
was beingfuncall
ed and loaded the whole Elfeed package along with it. So, my self-suggestion was to makeelfeed-link-store-link
to be added to the list only after Elfeed is loaded as whole. I declared Elfeed in myinit.el
throughuse-package
with:defer t
, and none of the other keywords were adequate. How can I achieve the behavior I want?Is it normal that
org-load-modules-maybe
alone takes 2 seconds to execute? Theorg-modules
it's looping on seems pretty vanilla with the value being(ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail ol-eww)
. Thus, I could not see any reason for this taking too long.