emacs-devel
[Top][All Lists]
Advanced

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

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


From: tumashu
Subject: Re:Re: How to make 'load' fast in window?
Date: Tue, 14 Jun 2016 11:25:07 +0800 (CST)

My emacs is GNU Emacs 24.5.1 (i686-pc-mingw32)

I want to convert the content of pyim-bigdict.pyim (A 40M text file) (https://github.com/tumashu/chinese-pyim-bigdict) to a hashtable,
so I use chinese-async to prin1 the hashtable to a el file, which is like:

#+BEGIN_EXAMPLE
(setq pyim-dict-cache #s(hash-table size 1000000 test equal rehash-size 1.5 rehash-threshold 0.8 data ("a" ("哎") "a-a" ("呵呵") "a-h" ("呵呵") ...)))
#+END_EXAMPLE

Then I use load function to load this file, pyim-dict-cache hashtable can be generated too, In my linux machine,  load this file only need 1s,
but in windows machine, this need 15-20s, very slow.

By the way, now I use  eval + read  instead, but seem to slow too.....

download pyim-bigdict-cf210fa066f2fa18c1606eeddfffcf84.el from  https://github.com/tumashu/tumashu-temp-files
and 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


At 2016-06-13 22:09:20, "Fabrice Popineau" <address@hidden> wrote: >Jiege Chen <jiegec <at> qq.com> writes: > >> >> tumashu <tumashu <at> 163.com> wrote: >> > I use "load" function to load a elisp file which include a 40M hashtable, >> > In linux, it only need 1s, while in window, it need 15s, which is too slowly, >> How to speed it up? > >On what machine? >Can you share your file? > >Regards, > >Fabrice > >

reply via email to

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