[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: process-file and Tramp's file cache

From: Stefan Monnier
Subject: Re: process-file and Tramp's file cache
Date: Tue, 18 Aug 2009 10:32:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> BTW, to improve the behavior in case of things like "git status", it
>> might be worthwhile to add some way to indicate that a particular use of
>> process-file is (supposed to be) free of side-effects.

> I would like to introduce a new variable `process-file-modification-list'.
> It's default value shall be `t', which means that any file on the remote
> host could have been modified by the corresponding `process-file' call.
> `nil' means that no file is modified during `process-file'.  A list of
> strings (remote file names) are indication, that exactly those files are
> modified, when `process-file' runs.

> This would allow Tramp to optimize its file cache. Currently, it assumes
> after every `process-file' call, that all cached values are invalid.
> This results in unnecessary check operations on the remote side.

> A typical use case in `vc-registered' would look like this:

>   (let (handler process-file-modification-list)
>     (cond ...

> Opinions?

How 'bout changing Tramp's process-file to compare the command (and
args) against a list of "known pure commands"?  This would keep it all
inside Tramp, which I think I like better (tho I also agree that this
information is not fundamentally specific to Tramp, although currently
Tramp is the only package able to make use of it).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]