unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: rms@gnu.org
Cc: Sascha Wilde <wilde@sha-bang.de>, emacs-devel@gnu.org
Subject: Re: tramp no longer recognizes when remote files changed
Date: Sun, 29 Jul 2007 17:40:34 +0200	[thread overview]
Message-ID: <87644343rh.fsf@gmx.de> (raw)
In-Reply-To: E1IEn1H-0004ef-GA@fencepost.gnu.org

Richard Stallman <rms@gnu.org> writes:

> What are the main occasions on which the cache is useful?

I've made a test: Run 1000x (file-attributes "/ssh:ford:/etc/hosts").
"ford" is another host in my LAN.

With enabled cache, it takes 1.821823 sec. Without cache, it takes
60.103737 sec. And it is a nearby host.

A simple (find-file "/ssh:ford:/etc/hosts") shows in the profiler the
following file name handler based functions:

expand-file-name                          127
file-exists-p                             42
file-attributes                           23
file-name-directory                       23
file-directory-p                          11
directory-file-name                       8
substitute-in-file-name                   7
file-name-nondirectory                    5
file-modes                                3
file-readable-p                           2
file-truename                             2
make-auto-save-file-name                  2
file-local-copy                           1
file-symlink-p                            1
file-writable-p                           1
insert-file-contents                      1
set-visited-file-modtime                  1

See f.e. the large number of `file-exists-p' calls. This is mainly due
to vc, there are repeated tests for existence of

/
/etc
/etc/hosts
/etc/RCS/hosts,v
/etc/hosts,v
/etc/RCS/hosts
/etc/SCCS/s.hosts
/etc/s.hosts
/etc/.bzr
/.bzr
/etc/.hg
/.hg
/etc/{arch}/=tagging-method
/{arch}/=tagging-method
/etc/MCVS/CVS
/MCVS/CVS

> Having a parameter for users to set is not a very good solution.
> First let's look for a way to make Tramp do the right combination
> of things by default.  Michael, can you try?

Tramp flushes the cached data in `verify-visited-file-modtime' now. That
seems to be sufficient.

Sascha, could you, please, test it?

Best regards, Michael.

  reply	other threads:[~2007-07-29 15:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-27  8:36 tramp no longer recognizes when remote files changed Sascha Wilde
2007-07-27  8:53 ` Michael Albinus
2007-07-27  9:02   ` Sascha Wilde
2007-07-27  9:31     ` Michael Albinus
2007-07-27 13:00       ` Sascha Wilde
2007-07-28 14:11         ` Richard Stallman
2007-07-29 15:40           ` Michael Albinus [this message]
2007-07-30 16:44             ` Richard Stallman
2007-07-30 17:24               ` Michael Albinus
2007-07-30 18:00             ` Sascha Wilde
2007-07-27 18:17       ` Stefan Monnier
2007-07-28 13:00         ` martin rudalics

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=87644343rh.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=wilde@sha-bang.de \
    /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).