[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How speedup find-dired?
From: |
Oleksandr Gavenko |
Subject: |
How speedup find-dired? |
Date: |
Mon, 17 Jan 2011 23:59:31 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
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 try set
(setq find-ls-option '("-print" . ""))
but resulted M-x find-dired buffer does not properly parsed by
'find-dired-filter', which uses 'dired-insert-set-properties'
which depend on 'directory-listing-before-filename-regexp'.
So I try different strings to start match this regex, this one match:
(string-match directory-listing-before-filename-regexp "-rw-rw-rw- 1
2010-08-10 23:01 fractal-generator.h")
So I set
(setq find-ls-option '("-printf '-rw-rw-rw- %s %AY-%Am-%Ad %AH:%AM
%p\n'" . ""))
And all work fine and fast. Further I replace %s with constant 0, to
make less attribute reading operation.
Also I think that replacing file access time with constant also make
running faster.
find with -ls option also work, but output contain many garbage data.
My questions why maintain permission/data/size if I only search for
file names?
How make this search platform independent and independent on installed
utils and their versions?
I previously post how make dired platform/utils independent,
based only on Emacs capabilities:
;;; ----------------------------------------------------------------
;;; ls-lisp, dired ls.
;; If non-nil - use 'insert-directory-program', which I dislike.
(setq ls-lisp-use-insert-directory-program nil)
(setq ls-lisp-ignore-case t)
(setq ls-lisp-dirs-first t)
(if (memq system-type '(windows-nt cygwin))
(setq ls-lisp-verbosity nil)
(setq ls-lisp-verbosity '(links uid gid)))
;; Force use 'ls-lisp-format-time-list'.
(setq ls-lisp-use-localized-time-format t)
(setq ls-lisp-format-time-list
'("%Y-%m-%d %H:%M:%S"
"%Y-%m-%d %H:%M "))
(require 'ls-lisp)
Help me with doing this for find-dired!
Also how about platform/utils independent grep-find/rgrep/lgrep?
--
Best regards!
- How speedup find-dired?,
Oleksandr Gavenko <=
- Re: How speedup find-dired?, Eli Zaretskii, 2011/01/17
- Re: How speedup find-dired?, Oleksandr Gavenko, 2011/01/18
- Re: How speedup find-dired?, Eli Zaretskii, 2011/01/18
- Re: How speedup find-dired?, Oleksandr Gavenko, 2011/01/18
- RE: How speedup find-dired?, Drew Adams, 2011/01/18
- Re: How speedup find-dired?, Le Wang, 2011/01/18
- RE: How speedup find-dired?, Drew Adams, 2011/01/18