From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#19390: 25.0.50; `package-activate' is too slow Date: Thu, 18 Dec 2014 14:14:44 -0200 Message-ID: References: <86a92oddfp.fsf@yandex.ru> <86mw6nkc6n.fsf@yandex.ru> <54904241.8010000@yandex.ru> <5490BFCD.5050505@yandex.ru> <5490ED6D.5080808@yandex.ru> <868ui5ervl.fsf@yandex.ru> <5492AE61.3040902@yandex.ru> <868ui5aubr.fsf@yandex.ru> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c32a56e912ac050a7fe39b X-Trace: ger.gmane.org 1418919327 21580 80.91.229.3 (18 Dec 2014 16:15:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2014 16:15:27 +0000 (UTC) Cc: 19390@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 18 17:15:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y1djU-0005UG-EC for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Dec 2014 17:15:20 +0100 Original-Received: from localhost ([::1]:54618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1djT-0002LB-QA for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Dec 2014 11:15:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1djL-0002Kf-As for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 11:15:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1djC-0005LT-SV for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 11:15:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1djC-0005Kv-Ml for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 11:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y1djC-000362-79 for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 11:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Dec 2014 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19390 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19390-submit@debbugs.gnu.org id=B19390.141891928711863 (code B ref 19390); Thu, 18 Dec 2014 16:15:02 +0000 Original-Received: (at 19390) by debbugs.gnu.org; 18 Dec 2014 16:14:47 +0000 Original-Received: from localhost ([127.0.0.1]:50296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1dix-00035G-4D for submit@debbugs.gnu.org; Thu, 18 Dec 2014 11:14:47 -0500 Original-Received: from mail-ob0-f176.google.com ([209.85.214.176]:50155) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1div-000357-0S for 19390@debbugs.gnu.org; Thu, 18 Dec 2014 11:14:45 -0500 Original-Received: by mail-ob0-f176.google.com with SMTP id vb8so4019636obc.7 for <19390@debbugs.gnu.org>; Thu, 18 Dec 2014 08:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=3df5KIKbbH9qmM5l170MNs6iO6bVG9FbbSUZXhDZtBg=; b=qqQKBPbKsMOJIfz2lWT5IN7EZHwke8CgcJ7DzAcf2JekNbKl1feHpgwmlclENogyUy DeLnWWy0F6a9h84WW+eEU2JvZov8Vm506OqamQJQWZM6hSDwKfDUCH/I8c+lI8rvqz5Z 3WsJpzfp23fiKxc+0tCYYGwSB5cDJG8LMTja6OkIUbw1+EhVlA0AEHYHxO0ZbhrZ8uyl FppPLfMvJMRNvWWwH/JJbCFX+11i++VQzOmK6caCkekQSQ1cCNJygiyLWZizMZOpRjjG HSNi4Fnwvn8IpZiMj4xbY692DAwNE+zlBG1H+HLAmyuPs8j3x6qlCSZBX3So1Vv+oaf6 Il8A== X-Received: by 10.182.231.135 with SMTP id tg7mr1803551obc.62.1418919284378; Thu, 18 Dec 2014 08:14:44 -0800 (PST) Original-Received: by 10.76.26.162 with HTTP; Thu, 18 Dec 2014 08:14:44 -0800 (PST) Original-Received: by 10.76.26.162 with HTTP; Thu, 18 Dec 2014 08:14:44 -0800 (PST) In-Reply-To: <868ui5aubr.fsf@yandex.ru> X-Google-Sender-Auth: Ws-8VSKTEzeAJQ3OabxadX07fmY X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97519 Archived-At: --001a11c32a56e912ac050a7fe39b Content-Type: text/plain; charset=UTF-8 I see what you mean now. The RELOAD argument should not be passed when activating dependencies. The dependency will already have been reloaded when (if) it was upgraded. Artur Malabarba On 18 Dec 2014 12:47, "Dmitry Gutov" wrote: > Stefan Monnier writes: > > >> Aside from it, if we compare with the alternative implementation > >> suggestions, the current one reloads all dependencies, even those that > >> haven't been (re)installed during the current session. > > > > It sounds serious, but I don't understand what you're referring to. > > Can you give an example? > > It reloads all dependencies of the package that is currently being > installed. > > Try this: > > (advice-add 'package-activate-1 :before > (lambda (pkg-desc &optional reload) > (message "package-activate-1 called with %s %s" > (package-desc-name pkg-desc) reload)) > '((name . "Parrot arguments"))) > > Then install company (if your haven't yet), and then, with Melpa in > package archives, install company-math. You'll see this in *Messages*: > > package-activate-1 called with company force > package-activate-1 called with math-symbol-lists force > package-activate-1 called with company-math force > --001a11c32a56e912ac050a7fe39b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I see what you mean now. The RELOAD argument should not be p= assed when activating dependencies.
The dependency will already have been reloaded when (if) it was upgraded. <= /p>

Artur Malabarba

On 18 Dec 2014 12:47, "Dmitry Gutov" &= lt;dgutov@yandex.ru> wrote:
Stefan Monnier <monnier@iro.umontreal.ca> wri= tes:

>> Aside from it, if we compare with the alternative implementation >> suggestions, the current one reloads all dependencies, even those = that
>> haven't been (re)installed during the current session.
>
> It sounds serious, but I don't understand what you're referrin= g to.
> Can you give an example?

It reloads all dependencies of the package that is currently being
installed.

Try this:

(advice-add 'package-activate-1 :before
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (lambda (pkg-desc &optional r= eload)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (message "package-act= ivate-1 called with %s %s"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(package-desc-name pkg-desc) reload))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '((name . "Parrot argume= nts")))

Then install company (if your haven't yet), and then, with Melpa in
package archives, install company-math. You'll see this in *Messages*:<= br>
package-activate-1 called with company force
package-activate-1 called with math-symbol-lists force
package-activate-1 called with company-math force
--001a11c32a56e912ac050a7fe39b--