Subject: Re: bug#29846: scroll and fontify takes longer time for file in slow network

From: Shuguang Sun <[email-masked]>
Date: Tue, 26 Dec 2017 09:04:32 +0800

On Tue, Dec 26, 2017 at 12:48 AM, Eli Zaretskii <[email-masked]> wrote:

> > From: Shuguang Sun <[email-masked]>
> > Date: Mon, 25 Dec 2017 17:47:52 +0800
> >
> > Backup, auto-save, and lockfiles has been disabled in .dir-locals
> >
> > ((nil
> >   (make-backup-files . nil)
> >   (create-lockfiles  . nil)
> >   (auto-save-default . nil)
> >   (auto-save-timeout . 10000)
> >   ))
>
> You've disabled file locking, but Emacs still checks whether some
> other Emacs session locked the file.  It does that as part of
> restore-buffer-modified-p, which is called by JIT font-lock (because
> fontification makes the buffer modified and JIT font-lock needs to
> undo that after it fontifies a chunk of buffer).  Checking whether a
> file is locked entails calling unlock_file, which in turn calls
> read_lock_data, which tries to open the lock file.  I'm guessing that
> this is slow on that remote volume of yours.
>
> Maybe we should support a special value of create-lockfiles which
> would mean don't create lockfiles and don't test fro lockfiles created
> by other Emacs sessions.
>

It makes sense. It has a short delayed reponse when I start to modify the
buffer (input, delete, etc.).
It will help single user if we can have a special value of create-lockfiles.