From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: Emacs 23.0 is much slower starting than Emacs 22.3 Date: Fri, 24 Oct 2008 00:33:01 +0200 Message-ID: References: <20081022091136.GB924@muc.de> <20081022151444.GE924@muc.de> <48FF58FB.6000302@harpegolden.net> <20081022211202.GA1037@muc.de> <49001F5A.7040402@harpegolden.net> <20081023090908.GB2666@muc.de> <4900ACF9.7060501@harpegolden.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224801212 31186 80.91.229.12 (23 Oct 2008 22:33:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2008 22:33:32 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org, monnier@iro.umontreal.ca, David De La Harpe Golden To: "Eli Zaretskii" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 24 00:34:33 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kt8l8-0005jh-Jo for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 00:34:28 +0200 Original-Received: from localhost ([127.0.0.1]:47555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kt8k2-0003CQ-A9 for ged-emacs-devel@m.gmane.org; Thu, 23 Oct 2008 18:33:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kt8jx-0003AD-6P for emacs-devel@gnu.org; Thu, 23 Oct 2008 18:33:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kt8ju-00038P-Ri for emacs-devel@gnu.org; Thu, 23 Oct 2008 18:33:11 -0400 Original-Received: from [199.232.76.173] (port=48853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kt8ju-00038I-Ha for emacs-devel@gnu.org; Thu, 23 Oct 2008 18:33:10 -0400 Original-Received: from mu-out-0910.google.com ([209.85.134.190]:64539) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kt8jt-0004Xk-Im for emacs-devel@gnu.org; Thu, 23 Oct 2008 18:33:10 -0400 Original-Received: by mu-out-0910.google.com with SMTP id i2so327359mue.6 for ; Thu, 23 Oct 2008 15:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=JriFbFfIuDKWR5CHjRU2zWFRKk0gq7wFRUjnx6JxN10=; b=kqX48ef6BzKyyRa173wqb4w4mYhkfObXR9DoWCQnM/3WCbvOrzDSXKw7gHRWp/GHMj mivJrCVZrhWwYwxu3DwT3uL6x6IplAnSOgdHQ2vqbRme6fid4gmeLbKW5l7UE10CW4R0 IUkn8XeyEKXcQ/rjmavhV1Nt4ROn1+m21Q79Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=LP7tqhYBx/oJS61UUvwUEUOQn4aC153nAIjNUy5YRX3ArbRV66prcgtHwvg24G/Ztm /pQWj+G7SvIxqGf1ApyRib5JRdNtPhqMIIBSFydrv5/HyDZYgD8xCIeka0Im8tw44wmi 4HBYFKH/7Ci2ELYuc/PfhhDUJU/3D4zY1Vgnc= Original-Received: by 10.181.48.4 with SMTP id a4mr406069bkk.6.1224801181257; Thu, 23 Oct 2008 15:33:01 -0700 (PDT) Original-Received: by 10.86.65.3 with HTTP; Thu, 23 Oct 2008 15:33:01 -0700 (PDT) In-Reply-To: Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104914 Archived-At: On Thu, Oct 23, 2008 at 11:52 PM, Eli Zaretskii wrote: >> Date: Thu, 23 Oct 2008 17:57:29 +0100 >> From: David De La Harpe Golden >> Cc: Stefan Monnier , emacs-devel@gnu.org >> >> I tried just putting 180 find-file-noselects in a file and loading it >> i.e. >> >> $ find /usr/local/src/emacs -name '*.c' -printf \ >> '(find-file-noselect "%p")\n' >fftest.el >> $ emacs --batch --eval '(byte-compile-file "fftest.el")' >> $ time emacs -l fftest.elc -f kill-emacs >> >> emacs run real user sys >> 22 1 4.523 3.888 0.136 >> 22 2 4.744 4.172 0.112 >> 22 3 4.457 3.836 0.176 >> 23 4 7.177 6.532 0.152 >> 23 5 7.198 6.544 0.160 >> 23 6 7.159 6.472 0.220 >> >> >> So FWIW probably the problem is in the find-file call path rather than >> anything desktop.el is doing in particular > > Sounds plausible. Next question: is the slow-down connected in any > way with decoding the buffer? To see if this is a factor, you could > compare 180 calls to insert-file-contents with the same number of > calls to insert-file-contents-literally, in both Emacs 22 and 23. I did a fast test using something as simple as this: (defun test-insert-dir (dir literally) (let ((files (directory-files dir t))) (dolist (file files) (unless (file-directory-p file) (with-temp-buffer (if literally (insert-file-contents-literally file) (insert-file-contents file))))))) (defun test-insert-emacs-lisp-dir () (benchmark 1 '(test-insert-dir "c:/emacs/u/070103/emacs/lisp/" nil)) (message "======================= After cache warm up") (message "Timing insert-file-contents-literally:") (benchmark 1 '(test-insert-dir "c:/emacs/u/070103/emacs/lisp/" t)) (benchmark 1 '(test-insert-dir "c:/emacs/u/070103/emacs/lisp/" t)) (benchmark 1 '(test-insert-dir "c:/emacs/u/070103/emacs/lisp/" t)) (message "Timing insert-file-contents:") (benchmark 1 '(test-insert-dir "c:/emacs/u/070103/emacs/lisp/" nil)) (benchmark 1 '(test-insert-dir "c:/emacs/u/070103/emacs/lisp/" nil)) (benchmark 1 '(test-insert-dir "c:/emacs/u/070103/emacs/lisp/" nil)) (message "Ready")) The output was ======================= After cache warm up Timing insert-file-contents-literally: Elapsed time: 5.531000s (0.094000s in 1 GCs) Elapsed time: 5.594000s Elapsed time: 5.828000s (0.093000s in 1 GCs) Timing insert-file-contents: Elapsed time: 9.484000s (0.188000s in 2 GCs) Elapsed time: 8.922000s (0.188000s in 2 GCs) Elapsed time: 8.953000s (0.203000s in 2 GCs)