I have Emacs 24.4 with AuCTeX 11.88, running on windows 8.1, on a strong computer.
Any time I run emacs, opening the first tex file takes 6 seconds, even if the tex file empty. This happens either when the tex file is the first file I open, or if emacs is already running (on a non-tex file). Opening a large non-tex file is very fast. This is why I suspect the culprit is AuCTeX. Opening the second tex file is also fast, even if I close the first tex file.
I ran the cpu profiler to see where most time is spent:
- command-execute 44 70%
- call-interactively 44 70%
- find-file 27 43%
- find-file-noselect 27 43%
- find-file-noselect-1 27 43%
- after-find-file 27 43%
- normal-mode 25 40%
- funcall 25 40%
- set-auto-mode 25 40%
- set-auto-mode-0 25 40%
- tex-mode 24 38%
- apply 21 33%
- TeX-tex-mode 21 33%
- latex-mode 15 24%
- apply 15 24%
- TeX-latex-mode 15 24%
+ LaTeX-common-initialization 6 9%
+ byte-code 3 4%
+ LaTeX-maybe-install-toolbar 2 3%
+ file-truename 1 1%
+ custom-declare-variable 1 1%
+ defvar 1 1%
+ TeX-run-mode-hooks 1 1%
+ byte-code 5 8%
+ file-truename 1 1%
+ byte-code 3 4%
+ run-hooks 2 3%
- menu-find-file-existing 16 25%
- find-file-read-args 16 25%
- read-file-name 16 25%
read-file-name-default 16 25%
auctex-11.88.6.tarwhich I believe is not for windows (in here). How can I know if it applies to me?I added emacs profiler output.
– Doron Shafrir Jun 26 '15 at 08:12M-x package-install RET auctex RET. Please, reply to messages here starting with@username, withusernamebeing the user you want to address, otherwise he/she won't be notified. – giordano Jun 26 '15 at 10:33I previously installed AUCTeX by unpacking the zip file in my emacs 24.4 directory, as instructed here.
– Doron Shafrir Jun 26 '15 at 12:28;-)– giordano Jun 26 '15 at 13:09;-)– Arash Esbati Jun 26 '15 at 19:53