emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make 'load' fast in window?


From: Fabrice Popineau
Subject: Re: How to make 'load' fast in window?
Date: Tue, 14 Jun 2016 07:36:19 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

tumashu <tumashu <at> 163.com> writes:

> download pyim-bigdict-cf210fa066f2fa18c1606eeddfffcf84.el from  
https://github.com/tumashu/tumashu-temp-filesand eval: 
> 
> #+BEGIN_EXAMPLE        (setq pyim-dict-cache              (with-temp-
buffer                (insert-file-contents "/path/to/pyim-bigdict-
cf210fa066f2fa18c1606eeddfffcf84.el")                (eval (read (current-
buffer)))))#+END_EXAMPLE
> 

So, starting from `emacs -Q' on an i7-4702HQ with emacs-25.0.94, windows 10, I 
get a user time of about 4s and the following profiler report:

- command-execute                                                 441  79%
 - call-interactively                                             441  79%
  - funcall-interactively                                         436  78%
   - eval-last-sexp                                               419  75%
    - elisp--eval-last-sexp                                       419  75%
     - eval                                                       213  38%
      - setq                                                      213  38%
       - let                                                      213  38%
        - save-current-buffer                                     213  38%
         - unwind-protect                                         213  38%
          - progn                                                 213  38%
             eval                                                 158  28%
           - insert-file-contents                                  11   1%
            - set-auto-coding                                      11   1%
             - find-auto-coding                                    11   1%
                sgml-html-meta-auto-coding-function                  7   1%
       elisp--eval-last-sexp-print-value                          206  37%
   - execute-extended-command                                      17   3%
    - execute-extended-command--shorter                            16   2%
     - completion-try-completion                                   16   2%
      - completion--nth-completion                                 16   2%
       - completion--some                                          16   2%
        - #<compiled 0x1002489fd>                                  16   2%
         - completion-pcm-try-completion                            9   1%
          - completion-pcm--find-all-completions                    9   1%
             completion-pcm--all-completions                        9   1%
           completion-basic-try-completion                          7   1%
    - sit-for                                                       1   0%
       redisplay                                                    1   0%
  - byte-code                                                       5   0%
   - read-extended-command                                          5   0%
    - completing-read                                               5   0%
     - completing-read-default                                      5   0%
        read-from-minibuffer                                        2   0%
- ...                                                             115  20%
   Automatic GC                                                   115  20%

I'm not sure what could explain such a huge difference with Linux. I don't have 
an easy way right now to run your test on the very same machine with Linux, but 
if someone can do it on the same cu, it would be very welcome.

I see 2 potential explanations:
- memory: allocation, or maybe swap (?, depending on your configuration)
- some transcoding of characters (I don't know much about what emacs does in 
this area and how it differs between Linux and Windows).

You should try emacs 25.1 beta. The memory allocator has been changed and is 
using native win32 memory allocation memory mapped files for buffers. It may be 
more efficient.

Regards,

Fabrice


reply via email to

[Prev in Thread] Current Thread [Next in Thread]