From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Opening (for the first time) a 10-line Org doc takes 4 seconds
Date: Tue, 18 Dec 2012 23:48:15 +0100 [thread overview]
Message-ID: <80licv564w.fsf@somewhere.org> (raw)
Hello,
Looking at how to improve my Org config, regarding speed, I notice that it
takes 4.22 s to open a simple 10-line Org file *for the first time* (when Org
wasn't loaded yet). The reason is that it requires a big amount of packages,
those requiring themselves many others, and so on.
Do you find such a time normal, or too much?
How to redo the test:
emacs -q -l .emacs-minimal.el
where `.emacs-minimal.el' is:
--8<---------------cut here---------------start------------->8---
(message "Loading Minimal Emacs...")
(defconst em/emacs-load-time-start (float-time))
;; change the pathnames appropriately!
(add-to-list 'load-path (expand-file-name "~/src/org-mode/lisp"))
(add-to-list 'load-path (expand-file-name "~/src/org-mode/contrib/lisp"))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(if (locate-library "org-loaddefs")
(require 'org-loaddefs)
(require 'org-install))
(defadvice require (around require-around)
"Leave a trace of packages being loaded."
(let* ((feature (ad-get-arg 0))
(require-depth (or (and (boundp 'require-depth) require-depth)
0))
(prefix (concat (make-string (* 2 require-depth) ? ) "")))
(cond ((featurep feature)
(message "%s%s -> %s... Done" ;; already loaded
prefix
(if load-file-name
(file-name-base load-file-name)
"nil?")
feature)
(setq ad-return-value feature))
(t
(let ((lvn/time-start))
(message "%s%s -> %s..."
prefix
(if load-file-name
(file-name-base load-file-name)
"nil?")
feature)
(setq lvn/time-start (float-time))
(let ((require-depth (1+ require-depth)))
ad-do-it))))))
(ad-activate 'require)
(find-file "TODO.org")
(message "Loading Minimal Emacs... Done (in %.2f s)"
(- (float-time) em/emacs-load-time-start))
--8<---------------cut here---------------end--------------->8---
and `TODO.org' is some simple Org file such as:
--8<---------------cut here---------------start------------->8---
#+TITLE: Simple Org file
#+LANGUAGE: en-us
* Emacs
** TODO Improve performance
Check out how to improve overall perf by putting chunks of code inside
(eval-after-load) forms.
--8<---------------cut here---------------end--------------->8---
That results in all the following packages to be loaded:
--8<---------------cut here---------------start------------->8---
Loading Minimal Emacs...
.emacs-minimal -> help-fns... Done [2 times]
org -> cl...
cl -> cl-lib... Done
cl -> macroexp... Done
org -> gnus-sum...
gnus-sum -> gnus...
gnus -> wid-edit...
gnus -> mm-util...
mm-util -> mail-prsvr...
mm-util -> timer... Done
gnus -> nnheader...
nnheader -> mail-utils...
nnheader -> mm-util... Done
nnheader -> gnus-util...
gnus-util -> time-date... Done
gnus -> gnus-util... Done
gnus -> nnheader... Done
gnus -> gnus-ems...
gnus-sum -> gnus-group...
gnus-group -> gnus... Done
gnus-group -> gnus-start...
gnus-start -> gnus... Done
gnus-start -> gnus-win...
gnus-win -> gnus... Done
gnus-win -> gnus-util... Done
gnus-start -> gnus-int...
gnus-int -> gnus... Done
gnus-int -> message...
message -> mailheader...
message -> gmm-utils...
message -> mail-utils... Done
message -> mailabbrev...
message -> mail-parse...
mail-parse -> mail-prsvr... Done
mail-parse -> ietf-drums...
ietf-drums -> mm-util... Done
mail-parse -> rfc2231...
rfc2231 -> ietf-drums... Done
rfc2231 -> rfc2047...
rfc2047 -> mm-util... Done
rfc2047 -> ietf-drums... Done
rfc2047 -> mail-prsvr... Done
rfc2047 -> rfc2045...
rfc2045 -> ietf-drums... Done
mail-parse -> rfc2047... Done
mail-parse -> rfc2045... Done
message -> mml...
mml -> mm-util... Done
mml -> mm-bodies...
mm-bodies -> mm-util... Done
mm-bodies -> rfc2047... Done
mm-bodies -> mm-encode...
mm-encode -> mail-parse... Done
mml -> mm-encode... Done
mml -> mm-decode...
mm-decode -> mail-parse... Done
mm-decode -> mm-bodies... Done
mml -> mml-sec...
message -> rfc822...
message -> format-spec...
cl-macs -> cl-lib... Done
cl-macs -> macroexp... Done
cl-macs -> gv...
gv -> macroexp... Done
message -> idna...
gnus-int -> gnus-range...
gnus-start -> gnus-spec...
gnus-spec -> gnus... Done
gnus-start -> gnus-range... Done
gnus-start -> gnus-util... Done
gnus-group -> nnmail...
nnmail -> gnus... Done
nnmail -> nnheader... Done
nnmail -> message... Done
nnmail -> gnus-util... Done
nnmail -> mail-source...
mail-source -> format-spec... Done
mail-source -> mm-util... Done
mail-source -> message... Done
nnmail -> mm-util... Done
nnmail -> gnus-int... Done
gnus-group -> gnus-spec... Done
gnus-group -> gnus-int... Done
gnus-group -> gnus-range... Done
gnus-group -> gnus-win... Done
gnus-group -> gnus-undo...
gnus-undo -> gnus-util... Done
gnus-undo -> gnus... Done
gnus-group -> gmm-utils... Done
gnus-group -> time-date... Done
gnus-group -> gnus-ems... Done
gnus-sum -> gnus-spec... Done
gnus-sum -> gnus-range... Done
gnus-sum -> gnus-int... Done
gnus-sum -> gnus-undo... Done
gnus-sum -> gnus-util... Done
gnus-sum -> gmm-utils... Done
gnus-sum -> mm-decode... Done
gnus-sum -> nnoo...
nnoo -> nnheader... Done
org -> calendar...
calendar -> cal-menu...
cal-menu -> calendar... Done
org -> find-func...
org -> format-spec... Done
Loading d:/home/sva/src/org-mode/lisp/org-loaddefs.el (source)...done
org -> ob-emacs-lisp...
ob-emacs-lisp -> ob...
ob -> cl... Done
ob -> ob-eval...
ob-eval -> cl... Done
ob -> org-macs...
ob -> org-compat...
org-compat -> cl... Done
org-compat -> org-macs... Done
ob-emacs-lisp -> ob-comint...
ob-comint -> ob... Done
ob-comint -> org-compat... Done
ob-comint -> comint...
comint -> ring...
comint -> ansi-color...
comint -> regexp-opt... Done
ob-comint -> cl... Done
org -> org-compat... Done
org -> org-version...
org -> outline...
org -> noutline... Done
org -> time-date... Done
org -> easymenu... Done
org -> overlay... Done
org -> org-macs... Done
org -> org-entities...
org-entities -> org-macs... Done
org-entities -> cl... Done
org -> org-faces...
org-faces -> org-macs... Done
org-faces -> org-compat... Done
org -> org-list...
org-list -> cl... Done
org-list -> org-macs... Done
org-list -> org-compat... Done
org -> org-pcomplete...
org-pcomplete -> cl... Done
org-pcomplete -> org-macs... Done
org-pcomplete -> org-compat... Done
org-pcomplete -> pcomplete...
pcomplete -> comint... Done
org -> org-src...
org-src -> org-macs... Done
org-src -> org-compat... Done
org-src -> ob-keys...
ob-keys -> ob... Done
org-src -> ob-comint... Done
org-src -> cl... Done
org -> org-footnote...
org-footnote -> cl... Done
org-footnote -> org-macs... Done
org-footnote -> org-compat... Done
org -> ob... Done
org -> ob-table...
ob-table -> ob... Done
org -> ob-lob...
ob-lob -> cl... Done
ob-lob -> ob... Done
ob-lob -> ob-table... Done
org -> ob-ref...
ob-ref -> ob... Done
ob-ref -> cl... Done
org -> ob-tangle...
ob-tangle -> ob... Done
ob-tangle -> org-src... Done
ob-tangle -> cl... Done
org -> ob-comint... Done
org -> ob-keys... Done
org -> font-lock... Done
org -> macroexp... Done [2 times]
org -> help-fns... Done [2 times]
org -> bytecomp...
bytecomp -> backquote... Done
bytecomp -> macroexp... Done
bytecomp -> cconv...
org -> warnings...
byte-opt -> bytecomp... Done
byte-opt -> macroexp... Done
org -> help-fns... Done [2 times]
org -> macroexp... Done [2 times]
.emacs-minimal -> org-bbdb...
org-bbdb -> org... Done
org-bbdb -> cl... Done
.emacs-minimal -> org-bibtex...
org-bibtex -> org... Done
org-bibtex -> bibtex...
bibtex -> button... Done
org-bibtex -> cl... Done
org-bibtex -> org-compat... Done
.emacs-minimal -> org-docview...
org-docview -> org... Done
.emacs-minimal -> org-gnus...
org-gnus -> org... Done
org-gnus -> gnus-util... Done
org-gnus -> gnus-sum... Done
.emacs-minimal -> org-info...
org-info -> org... Done
.emacs-minimal -> org-jsinfo...
org-jsinfo -> org-exp...
org-exp -> org... Done
org-exp -> org-macs... Done
org-exp -> org-agenda...
org-agenda -> org... Done
org-agenda -> org-macs... Done
org-agenda -> cl... Done
org-agenda -> macroexp... Done
org-exp -> ob-exp...
ob-exp -> ob... Done
ob-exp -> cl... Done
org-exp -> org-src... Done
org-exp -> cl... Done
org-exp -> macroexp... Done [2 times]
org-jsinfo -> org-html...
org-html -> org-exp... Done
org-html -> format-spec... Done
org-html -> cl... Done
.emacs-minimal -> org-irc...
org-irc -> org... Done
.emacs-minimal -> org-mew...
org-mew -> org... Done
.emacs-minimal -> org-mhe...
org-mhe -> org... Done
.emacs-minimal -> org-rmail...
org-rmail -> org... Done
.emacs-minimal -> org-vm...
org-vm -> org... Done
.emacs-minimal -> org-w3m...
org-w3m -> org... Done
.emacs-minimal -> org-wl...
org-wl -> org... Done
OVERVIEW
Loading vc-svn...done
Loading vc-git...done
.emacs-minimal -> vc-git... Done [2 times]
Loading Minimal Emacs... Done (in 4.22 s)
--8<---------------cut here---------------end--------------->8---
what takes 4.22 seconds on my machine.
If all of the above packages are somehow always required, then, yes, that's
normal I guess.
Best regards,
Seb
--
Sebastien Vauban
next reply other threads:[~2012-12-18 22:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 22:48 Sebastien Vauban [this message]
2012-12-18 23:33 ` Opening (for the first time) a 10-line Org doc takes 4 seconds Bastien
2012-12-19 9:05 ` Sebastien Vauban
2012-12-23 8:52 ` Bastien
2012-12-19 15:09 ` Achim Gratz
2013-01-05 11:39 ` Bastien
2013-01-05 12:01 ` Achim Gratz
2013-01-05 12:37 ` Bastien
2013-01-05 13:23 ` Achim Gratz
2013-01-05 13:37 ` Bastien
2013-01-16 1:49 ` Bernt Hansen
2013-01-16 17:04 ` Achim Gratz
2013-01-05 12:39 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80licv564w.fsf@somewhere.org \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).