From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: How speedup find-dired? Date: Tue, 18 Jan 2011 12:08:07 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1295345353 13871 80.91.229.12 (18 Jan 2011 10:09:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 18 Jan 2011 10:09:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 18 11:09:09 2011 Return-path: Envelope-to: geh-help-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 1Pf8Uu-0000hf-In for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Jan 2011 11:09:08 +0100 Original-Received: from localhost ([127.0.0.1]:52411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pf8Ut-0007Ti-Pl for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Jan 2011 05:09:07 -0500 Original-Received: from [140.186.70.92] (port=45857 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pf8UK-0007Tb-3c for help-gnu-emacs@gnu.org; Tue, 18 Jan 2011 05:08:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pf8UI-00034z-Vk for help-gnu-emacs@gnu.org; Tue, 18 Jan 2011 05:08:32 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:38853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pf8UI-00034Y-KK for help-gnu-emacs@gnu.org; Tue, 18 Jan 2011 05:08:30 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pf8UB-0000PH-FC for help-gnu-emacs@gnu.org; Tue, 18 Jan 2011 11:08:23 +0100 Original-Received: from 91.193.68.214 ([91.193.68.214]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Jan 2011 11:08:23 +0100 Original-Received: from gavenko by 91.193.68.214 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 18 Jan 2011 11:08:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 91 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 91.193.68.214 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78530 Archived-At: On 18.01.2011 0:57, Eli Zaretskii wrote: >> From: Oleksandr Gavenko >> Date: Mon, 17 Jan 2011 23:59:31 +0200 >> >> I use Cygwin/Windows combination. >> >> Default value of 'find-ls-option' is: >> >> ("-ls" . "-gilsb") >> >> or which in my case: >> >> ("-exec ls -ld {} \\;" . "-ld") >> >> Invoking ls for every file is too slow (~= 3 file per sec). > > I lost you right here: doesn't `("-ls" . "-gilsb")' work for you? > That should cause Emacs to invoke "find ... -ls", instead of invoking > a separate `ls' program for each file. > Thanks in replay, and sorry for a lot of words (( I wrote that I try "-ls", but see output: $ find . -ls 562949953421501 2 -rw-r--r-- 1 user Отсутствует 1539 июн 16 2010 ./.emacs 14355223812252264 24 -rw-r--r-- 1 user Отсутствует 47724 янв 18 09:46 ./.emacs-my 844424930132155 2 -rw-r--r-- 1 user Отсутствует 828 янв 18 09:44 ./.emacs-post 562949953421500 1 -rw-r--r-- 1 user Отсутствует 209 янв 17 15:07 ./.emacs-pre As I wrote there are many useless data, I need only file names! There so many useless data that file names truncated to next line! As wrote it is not easy possible to force parse simple find output by dired, like with 'find . -print'. Now I stop on GNU find: (setq find-ls-option '("-printf '-rw-rw-rw- 0 %AY-%Am-%Ad %AH:%AM %p\n'" . "")) This format parsed by 'dired-insert-set-properties' and output aligned by column. > Also, if your `find' and `ls' ports are slow, I would look for faster > ports rather than for "portable" tweaks of Emacs. Tweaks that seek to > fix platform-specific bugs or misfeatures can never be portable, in my > experience. > I use Cygwin and think that it provide very good packages! It is allow me use native Emacs much easy as on Linux. ls (GNU coreutils) 8.5 find (GNU findutils) 4.5.9 I happy by making dired platform independent as solution based only on Emacs primitives. This also allow me to make dired look and feel common to all platform and don't care about 'ls' flavor. I expect Emacs make things like listening files/dirs, searching for files and for file's content built in. But it is not true. Why maintain 'directory-listing-before-filename-regexp' like regexp (about 1600 chars length string) and many 'if' statement instead having internal 'find' analog? My point is when I promote Emacs to my colleagues I must say that they need find/grep/ls. Some of this people don't know what is this at all. They say that their favorite IDE make this out of the box and surprised that Emacs can not just handle such simple things. >> I try set >> >> (setq find-ls-option '("-print" . "")) > > Did you try > > (setq find-ls-option '("-ls" . "-gilsb")) > > ? If you did, what happened? > See upper.