From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.bugs Subject: bug#5833: 23.1.94; Opening files on network shares on w32 is slow Date: Tue, 6 Apr 2010 09:12:40 +0200 Message-ID: References: <8339zb21w3.fsf@gnu.org> <838w92yt7f.fsf@gnu.org> <83mxxhy31s.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1270538785 19045 80.91.229.12 (6 Apr 2010 07:26:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Apr 2010 07:26:25 +0000 (UTC) Cc: 5833@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 06 09:26:24 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz3B0-0007Zo-36 for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Apr 2010 09:26:22 +0200 Original-Received: from localhost ([127.0.0.1]:55776 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nz3Az-0004yU-5Q for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Apr 2010 03:26:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nz3At-0004yA-BD for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2010 03:26:15 -0400 Original-Received: from [140.186.70.92] (port=37191 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nz3An-0004vO-Cf for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2010 03:26:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nz3Ak-0007Ej-6W for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2010 03:26:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48703) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz3Aj-0007Dt-QD for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2010 03:26:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Nz2z3-00067c-PW; Tue, 06 Apr 2010 03:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mathias Dahl Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Apr 2010 07:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5833 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5833-submit@debbugs.gnu.org id=B5833.127053798623520 (code B ref 5833); Tue, 06 Apr 2010 07:14:01 +0000 Original-Received: (at 5833) by debbugs.gnu.org; 6 Apr 2010 07:13:06 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz2y9-00067J-QG for submit@debbugs.gnu.org; Tue, 06 Apr 2010 03:13:06 -0400 Original-Received: from mail-ew0-f209.google.com ([209.85.219.209]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nz2y7-00066i-Mn for 5833@debbugs.gnu.org; Tue, 06 Apr 2010 03:13:04 -0400 Original-Received: by ewy1 with SMTP id 1so837549ewy.15 for <5833@debbugs.gnu.org>; Tue, 06 Apr 2010 00:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=HG5vrL6zAwc/esQq3Tra9O/kwwfQRqf7TzxN8tueWf4=; b=v62Q6HVPDIl2/qphk/K5EjCddfYX4ZfDQ82vSxgvs9xN1c9ZPkHE8+uo8PXLNsVeLc KUm40BdGjmrG5XVU+0+gt6fB0YqWOd+2vwZvqDb4vUBYeVEaMu7Vay9qlV73iuE3u3Pu PrLRX+zmZT1ZlDsmBoefdwQM+tUD22lsAYIEw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=lUR2MSUMkZMAIw+KUPz8i7aKdpMa6DD974+LeWUclVMt4TOIRtVQLklTpfgM++eU/r xMwdhM9WefcFxoxwsJRWbRwXlS49KW3njhjXkie+GT0MqzsZ3Mo+9T/eGQ/OlB+7ANgZ AlYE79DOb4A3yVXJOAsRX2le1FQClvHJZrnsY= Original-Received: by 10.213.9.129 with HTTP; Tue, 6 Apr 2010 00:12:40 -0700 (PDT) In-Reply-To: <83mxxhy31s.fsf@gnu.org> Original-Received: by 10.213.90.204 with SMTP id j12mr3696617ebm.27.1270537980106; Tue, 06 Apr 2010 00:13:00 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 06 Apr 2010 03:14:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35969 Archived-At: > That's strange: I thought they would slash much more. > > How about insert-file-contents and insert-file-contents-literally -- > can you time those? I changed the measure function to this: (defun measure () (dotimes (i 10) (let ((time1 (float-time)) time2) (with-temp-buffer (insert-file-contents "//corpnet/files/Archive/Archive75/docman/core/docman 5.11.0/docman/database/docman/refobj.apy")) (setq time2 (float-time)) (message "Time elapsed for insert-file-contents: %s" (- time2 time1))= ))) The results are very interesting: emacs -Q Time elapsed for insert-file-contents: 3.5160000324249268 Time elapsed for insert-file-contents: 0.6719999313354492 Time elapsed for insert-file-contents: 0.6410000324249268 Time elapsed for insert-file-contents: 0.6559998989105225 Time elapsed for insert-file-contents: 0.6089999675750732 Time elapsed for insert-file-contents: 0.6410000324249268 Time elapsed for insert-file-contents: 0.687000036239624 Time elapsed for insert-file-contents: 0.6719999313354492 Time elapsed for insert-file-contents: 0.5940001010894775 Time elapsed for insert-file-contents: 0.9689998626708984 (setq vc-handled-backends nil) Time elapsed for insert-file-contents: 0.687000036239624 Time elapsed for insert-file-contents: 0.6100001335144043 Time elapsed for insert-file-contents: 0.6089999675750732 [2 times] Time elapsed for insert-file-contents: 0.5940001010894775 Time elapsed for insert-file-contents: 2.984999895095825 Time elapsed for insert-file-contents: 0.7030000686645508 Time elapsed for insert-file-contents: 1.2339999675750732 Time elapsed for insert-file-contents: 0.625 Time elapsed for insert-file-contents: 0.6099998950958252 (setq locate-dominating-stop-dir-regexp "") Time elapsed for insert-file-contents: 0.6089999675750732 Time elapsed for insert-file-contents: 0.625 Time elapsed for insert-file-contents: 0.6410000324249268 Time elapsed for insert-file-contents: 0.5930001735687256 Time elapsed for insert-file-contents: 0.5939998626708984 Time elapsed for insert-file-contents: 1.0160000324249268 Time elapsed for insert-file-contents: 0.6719999313354492 Time elapsed for insert-file-contents: 0.625 Time elapsed for insert-file-contents: 0.6089999675750732 Time elapsed for insert-file-contents: 0.6090002059936523 (This is for the larger of the two files) Suddenly we get relatively good results. > Another idea is to use elp.el to profile the various functions called > by find-file. =A0At least for the Lisp level, we will see where's the > bottleneck, and that might give some ideas. This is my first attempt at using elp.el so I might not know what I am doing :) I sucked out all function calls in find-file-noselect and got this: find-file-noselect 30 122.34599999 4.0782 find-file-noselect-1 30 85.545000000 2.8515000000 file-exists-p 780 35.546999999 0.0455730769 file-truename 63 30.012999999 0.4763968253 find-buffer-visiting 30 16.72 0.5573333333 file-attributes 60 3.9890000000 0.0664833333 file-directory-p 31 2.7210000000 0.0877741935 mapcar 31 2.1270000000 0.0686129032 string-match 8867 0.125 1.40...e-005 message 35 0.031 0.0008857142 expand-file-name 842 0.016 1.90...e-005 ... Digging further, instrumenting all functions in find-file-noselect-1 as well (the ones instrumented earlier is still instrumented): find-file-noselect 30 119.71899999 3.9906333333 find-file-noselect-1 30 84.484000000 2.8161333333 insert-file-contents 30 42.253 1.4084333333 after-find-file 30 42.230999999 1.4076999999 file-exists-p 780 34.638999999 0.0444089743 file-truename 60 29.048999999 0.4841499999 funcall 40 21.326999999 0.533175 find-buffer-visiting 30 16.000999999 0.5333666666 file-attributes 60 4.0619999999 0.0677 file-directory-p 30 2.124 0.0708 mapcar 25 2.045 0.0818 file-readable-p 48 0.5800000000 0.0120833333 string-match 8798 0.08 9.09...e-006 message 33 0.064 0.0019393939 file-name-directory 890 0.048 5.39...e-005 expand-file-name 841 0.0310000000 3.68...e-005 abbreviate-file-name 172 0.015 8.72...e-005 ... Does any figure above stand out to you? /Mathias