From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: How to make 'load' fast in window? Date: Tue, 14 Jun 2016 17:46:57 +0300 Message-ID: <83wplreske.fsf@gnu.org> References: <69267f1.4532.15547978bb7.Coremail.tumashu@163.com> <65b7225c.5e6c.1554cf0f4a4.Coremail.tumashu@163.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1465917802 20287 80.91.229.3 (14 Jun 2016 15:23:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Jun 2016 15:23:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Fabrice Popineau , tumashu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 14 17:23:17 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bCqBR-0000zM-7r for ged-emacs-devel@m.gmane.org; Tue, 14 Jun 2016 17:23:17 +0200 Original-Received: from localhost ([::1]:36101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCqBQ-0004hP-DF for ged-emacs-devel@m.gmane.org; Tue, 14 Jun 2016 11:23:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCpbW-0001ZU-FL for emacs-devel@gnu.org; Tue, 14 Jun 2016 10:46:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCpbR-00085y-D5 for emacs-devel@gnu.org; Tue, 14 Jun 2016 10:46:09 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCpbR-00085H-A0; Tue, 14 Jun 2016 10:46:05 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4527 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bCpbP-0005bm-ET; Tue, 14 Jun 2016 10:46:03 -0400 In-reply-to: (message from Fabrice Popineau on Tue, 14 Jun 2016 07:36:19 +0000 (UTC)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204357 Archived-At: > From: Fabrice Popineau > Date: Tue, 14 Jun 2016 07:36:19 +0000 (UTC) > > > 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: On an i7 system I get 0.6s with Emacs 25.0.95 and 2s with 24.5. Both are optimized (-O2) builds. This is comparable with the GNU/Linux results, and is what I'd expect. Unless yours are not -O2, I don't understand how you get so much slower times. My guess is that the OP uses an unoptimized build of Emacs on Windows, or the Windows machine is much slower than the GNU/Linux one (or both). There's nothing in this code or the profile you present that could be significantly slower on Windows; the only potential suspect, file I/O, takes a negligible fraction of time.