unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ergus <spacibba@aol.com>
Cc: 49264@debbugs.gnu.org
Subject: bug#49264: 28.0.50; project.el+tramp performance issue
Date: Wed, 30 Jun 2021 15:46:26 +0300	[thread overview]
Message-ID: <83sg0zmsf1.fsf@gnu.org> (raw)
In-Reply-To: <20210629222142.jbyegdo72wkp6vv2@Ergus> (message from Ergus on Wed, 30 Jun 2021 00:21:42 +0200)

> Date: Wed, 30 Jun 2021 00:21:42 +0200
> From: Ergus <spacibba@aol.com>
> Cc: 49264@debbugs.gnu.org
> 
> >AFAICT, most of the time is taken by 'apply', but the profile doesn't
> >show which function is called by 'apply'.  Can you tell which function
> >is that?
> >
> apply is called in vc-responsible-backend and looking at the percentages
> it is obvious that the times are going in
> 
>    23%                      + vc-svn-responsible-p
>    18%                      + vc-bzr-responsible-p
>    15%                      + vc-hg-responsible-p
>     6%                      + vc-git-responsible-p
>     2%                      + vc-cvs-responsible-p
>     2%                      + vc-rcs-responsible-p
>     1%                      + vc-sccs-responsible-p
>     1%                      + vc-src-responsible-p
> ------
>    68%
> 
> These are the backends' functions that are passed to vc-call-backend in
> the mapcar in vc-responsible-backend and the output of
> vc-find-backend-function.

But if you still need to wait for dozens of seconds with just 2
backends, which take only 20% of the time according to the above, then
how do you want to speed this up in your case?  How about not using
ivy (which AFAICT is the root cause of this slowness)?

> >... after removing the "unused" VC back-ends, you say that the code
> >still runs very slowly.  So is the issue with VC back-ends still
> >relevant, and if so, how?
> >
> Yes, it is. It is still slow, lets say around 20-40 seconds to complete
> the command. But that's that's much faster than before (3-5 minutes);
> but still too slow to make the command usable.

It's still unacceptably slow, so that couldn't be a solution,
certainly not a general one, IMO.

> As a note here, when N files are in the same directory the normal thing
> is that all of them share the VCS. So calling a check function for all
> of them is redundant and slow.

AFAIR, that's not really true, and ISTR project.el aims to support the
use cases with several different VC backends.

And again, waiting for 30 seconds when you have just 10 buffers is
unacceptable.  E.g., in the session where I'm writing this, I have 80
buffers that visit files in a single branch of the Emacs Git
repository, almost an order of magnitude more than your 10 buffers.

So we must find some better way of getting reasonable performance in
this use case.  If the round-trip of the VC backend to a remote
filesystem is the bottleneck, let's try to speed that up in some way.





  reply	other threads:[~2021-06-30 12:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87fsx13aiz.fsf.ref@aol.com>
2021-06-28 22:11 ` bug#49264: 28.0.50; project.el+tramp performance issue Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-29 12:05   ` Eli Zaretskii
2021-06-29 22:21     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-30 12:46       ` Eli Zaretskii [this message]
2021-06-30 13:25         ` Phil Sainty
2021-06-30 13:35           ` Eli Zaretskii
2021-06-30 15:10         ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-29 13:00   ` Dmitry Gutov
2021-06-30  0:01     ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-26 16:56   ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-26 23:04     ` Dmitry Gutov
2021-08-09  0:59       ` Dmitry Gutov
2021-08-17  0:45         ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-19  1:19           ` Dmitry Gutov
2021-08-19  3:08             ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-21  2:23               ` Dmitry Gutov
2021-08-21  5:43                 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-21 10:59                   ` Dmitry Gutov

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=83sg0zmsf1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=49264@debbugs.gnu.org \
    --cc=spacibba@aol.com \
    /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).