From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#6810: 23.2; dired-omit-mode makes dired slow Date: Sat, 04 Dec 2010 17:34:21 +0000 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291484735 12088 80.91.229.12 (4 Dec 2010 17:45:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Dec 2010 17:45:35 +0000 (UTC) To: 6810@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 04 18:45:30 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 1POwAq-000332-AP for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Dec 2010 18:45:28 +0100 Original-Received: from localhost ([127.0.0.1]:36756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POwAp-0005Ww-PM for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Dec 2010 12:45:27 -0500 Original-Received: from [140.186.70.92] (port=37946 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POwAf-0005UX-HA for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2010 12:45:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POwAd-0001G8-Jh for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2010 12:45:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POwAd-0001G4-Gy for bug-gnu-emacs@gnu.org; Sat, 04 Dec 2010 12:45:15 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1POvuv-0007Ow-UM; Sat, 04 Dec 2010 12:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Dec 2010 17:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6810 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6810-submit@debbugs.gnu.org id=B6810.129148372028421 (code B ref 6810); Sat, 04 Dec 2010 17:29:01 +0000 Original-Received: (at 6810) by debbugs.gnu.org; 4 Dec 2010 17:28:40 +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 1POvua-0007OM-Ad for submit@debbugs.gnu.org; Sat, 04 Dec 2010 12:28:40 -0500 Original-Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1POvuX-0007O9-Mf for 6810@debbugs.gnu.org; Sat, 04 Dec 2010 12:28:38 -0500 Original-Received: by wyf23 with SMTP id 23so9893597wyf.3 for <6810@debbugs.gnu.org>; Sat, 04 Dec 2010 09:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=CXvphXVdu+Vr2pSxWYQbYlSSPul8Xi+DstvHUgyWjFY=; b=Wkepwfcd6lTIVY9eLPGhTrMdVhoRRFNDyuoytlXHPdyBxQRHjgcUvCsiNB2ojc+J6U +k4nThQ0F+O3bcIHznXLg/iCVrKUjRE8F/Otbxbj/CiBTomBHw/BRvkgDDDlDnVzMSYW abNLpVuygUqNzMOXUjY9YZ6gZikN9JCnzIr88= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=Sf/0wv+cDqb692c2abvQ0rqwuxC/VMdxgeIa21LPlo/ACISzucQLN0j+eqmob5vkOw ru52gSX+mdIVLjpAgUH17dZQKI1IVlvfZa+RjQuuvd9vSMRrnkLiPIozPHYb0kKGqxHX yGANirzAiMdFs3R1YByY+ih9bS0Y5mfZfTAqU= Original-Received: by 10.227.145.68 with SMTP id c4mr3507846wbv.42.1291484064658; Sat, 04 Dec 2010 09:34:24 -0800 (PST) Original-Received: from Victoria.local (cpc1-cmbg13-0-0-cust596.5-4.cable.virginmedia.com [86.9.122.85]) by mx.google.com with ESMTPS id a2sm1496076wer.17.2010.12.04.09.34.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 04 Dec 2010 09:34:23 -0800 (PST) In-Reply-To: (Leo's message of "Fri, 06 Aug 2010 16:19:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.90 (Mac OS X 10.6.5) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 04 Dec 2010 12:29:01 -0500 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:42148 Archived-At: On 2010-08-06 16:19 +0100, Leo wrote: > When dired-omit-mode is on, operations on marked files become much > slower. To see this, following these steps: > > 1. Emacs -q > > 2. eval: > (require 'dired-x) > (add-hook 'dired-mode-hook 'dired-omit-mode) > > 3. C-x d and enter emacs/lisp (or any dir that has a few dozen files) > > 4. Mark all files by typing: * / t > > 5. Change mode to 444 by typing: M 444 RET > > > For every marked file, a message is displayed something like: > Redisplaying...xyz.el > Omitting... > (Nothing to omit) > > Can this inefficiency be rid of? Thank you. > > Leo `dired-do-redisplay' iterates over the marked files calling dired-update-file-line which triggers dired-after-readin-hook (see line 1132 in dired-aux). So that hook is being run for as many times as the number of files marked. Any objection to something like this: diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 62d6928..90fd1e69 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1017,10 +1017,13 @@ ;; message much faster than making dired-map-over-marks show progress (dired-uncache (if (consp dired-directory) (car dired-directory) dired-directory)) - (dired-map-over-marks (let ((fname (dired-get-filename))) + (dired-map-over-marks (let ((fname (dired-get-filename)) + ;; disable readin hook until later + (dired-after-readin-hook nil)) (message "Redisplaying... %s" fname) (dired-update-file-line fname)) arg) + (run-hooks 'dired-after-readin-hook) (dired-move-to-filename) (message "Redisplaying...done"))) Leo