unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: no-spam@cua.dk (Kim F. Storm)
Cc: bug-gnu-emacs@gnu.org
Subject: Re: Allow prefix arg for ido-find-*file* (maybe)
Date: Sun, 26 Sep 2004 23:29:57 +0200	[thread overview]
Message-ID: <m3r7oo7m7e.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <mailman.3966.1096077688.1998.bug-gnu-emacs@gnu.org> (Sean O'Rourke's message of "Fri, 24 Sep 2004 18:54:37 -0700")

"Sean O'Rourke" <sorourke@cs.ucsd.edu> writes:

> At Sat, 25 Sep 2004 02:13:01 +0200,
> no-spam@cua.dk (Kim F. Storm) wrote:
>> It only works on systems (e.g GNU/Linux) where file-attributes returns
>> a sensible size for directories.  So it probably fails on Windoze...
>
> Thanks for looking into this.  It looks like it does the trick, though
> the default threshhold is way too high to have an effect -- something
> like 4096 or 8192 might be better.  

I chose the default limit so it doesn't get activated too often.
Specifically, it doesn't get activated in the emacs/lisp directory.

And I don't see any slow-down for the current limit on my laptop.

But it's a defcustom, so change it to suit your own needs.

>                                     file-attributes seems sensical on
> Darwin as well, though I'd rather specify a (possibly rough) number of
> files, and
>
>     (length (directory-files DIR nil nil t))
>
> isn't that slow -- it's all the filtering and fontification done by
> ido that slows things down.  

For a local file system that is true -- but I have some directories
which have +25000 files, and in those your code takes a few seconds
to execute.

But it would make sense to use the above as an alternative or
alternative for e.g. windoze...  I'll think about it!

>                              FWIW, on Darwin the second element of
> file-attributes seems to be the number of files.  Weird.

Could you debug that?

-- 
Kim F. Storm  http://www.cua.dk

  parent reply	other threads:[~2004-09-26 21:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2739.1095182044.1998.bug-gnu-emacs@gnu.org>
2004-09-25  0:13 ` Allow prefix arg for ido-find-*file* (maybe) Kim F. Storm
2004-09-25  1:54   ` Sean O'Rourke
     [not found]   ` <mailman.3966.1096077688.1998.bug-gnu-emacs@gnu.org>
2004-09-26 21:29     ` Kim F. Storm [this message]
2004-09-26 22:02       ` Sean O'Rourke
2004-09-14 17:07 Sean O'Rourke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r7oo7m7e.fsf@kfs-l.imdomain.dk \
    --to=no-spam@cua.dk \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).