From: lee <lee@yun.yagibdah.de>
To: help-gnu-emacs@gnu.org
Subject: Re: iterating over a list while removing elements
Date: Fri, 21 Mar 2014 06:25:59 +0100 [thread overview]
Message-ID: <87a9ckunq0.fsf@yun.yagibdah.de> (raw)
In-Reply-To: <83k3bo7hie.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Mar 2014 22:16:25 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: lee <lee@yun.yagibdah.de>
>> Date: Thu, 20 Mar 2014 18:34:58 +0100
>>
>> Joost Kremers <joost.m.kremers@gmail.com> writes:
>>
>> > Note, BTW, that file-directory-p returns t for "." and "..". It seems to
>> > me that the only two names that directory-files could return that you
>> > really want to exclude are those two,[1] so there's no need for
>> > multisearch-directory-ref-p, I think. (Or is there?)
>>
>> The idea is that (file-directory-p "..") may cause a file look-up which
>> can be avoided by string-matching.
>
> After you've read the directory, its entries, including "..", are in
> the cache, so (file-directory-p "..") should not need to hit the disk.
>
>> How does the disk cache deal with non-existing files? The
>> meta-information is probably in the cache (more or less), yet there can
>> be no information for non-existing files.
>
> Non-existing files are missing entries in their parent directories,
> which are files by themselves, and thus cached. So dealing with
> non-existing files just means reading their directory (from memory,
> not from disk) and noticing that a file by that name is not there.
That`s probably all true --- yet I think a simple string match may be
faster. And if the cache is small, without the check it might yet cause
file-lookups ...
--
Knowledge is volatile and fluid. Software is power.
next prev parent reply other threads:[~2014-03-21 5:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.17526.1395229207.10748.help-gnu-emacs@gnu.org>
2014-03-19 13:12 ` iterating over a list while removing elements Pascal J. Bourguignon
2014-03-19 18:28 ` Joost Kremers
2014-03-20 17:34 ` lee
2014-03-20 20:16 ` Eli Zaretskii
2014-03-21 5:25 ` lee [this message]
2014-03-20 16:33 ` lee
2014-03-19 11:39 lee
2014-03-19 12:39 ` Stefan
2014-03-20 16:02 ` lee
2014-03-19 13:11 ` Michael Albinus
2014-03-20 16:10 ` lee
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9ckunq0.fsf@yun.yagibdah.de \
--to=lee@yun.yagibdah.de \
--cc=help-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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.