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 15:50:28 -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> <5492FDBD.1040704@yandex.ru> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113eabb4496d3c050a813a5f X-Trace: ger.gmane.org 1418925087 25877 80.91.229.3 (18 Dec 2014 17:51:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Dec 2014 17:51: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 18:51:18 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 1Y1fEK-0008OA-8w for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Dec 2014 18:51:16 +0100 Original-Received: from localhost ([::1]:55135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1fEJ-0006Fl-9O for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Dec 2014 12:51:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1fEB-0006Fb-Pl for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 12:51:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1fE6-00067Q-MR for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 12:51:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1fE6-00067M-IO for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 12:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y1fE6-0005gp-BO for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 12:51: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 17:51: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.141892503221834 (code B ref 19390); Thu, 18 Dec 2014 17:51:02 +0000 Original-Received: (at 19390) by debbugs.gnu.org; 18 Dec 2014 17:50:32 +0000 Original-Received: from localhost ([127.0.0.1]:50458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1fDb-0005g5-IU for submit@debbugs.gnu.org; Thu, 18 Dec 2014 12:50:31 -0500 Original-Received: from mail-oi0-f51.google.com ([209.85.218.51]:65235) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1fDZ-0005fw-5w for 19390@debbugs.gnu.org; Thu, 18 Dec 2014 12:50:29 -0500 Original-Received: by mail-oi0-f51.google.com with SMTP id e131so718971oig.10 for <19390@debbugs.gnu.org>; Thu, 18 Dec 2014 09:50:28 -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=e3LUWuCZgo9cBOY3aodqEuxLPNuxjGGQrc18rde3mhI=; b=ykMSRd9NBq4xjDi+GRiCg+Qm5QHuB0miy/zYLWjj1o7YO5ixh69xaev/iFbiM+c5Wv oRbc4MsCMHn5huV9ujlmNW+Ws90ggM1PHXNYk/vmywPenyeqEmfgGJIy6cK4iNs/W0Dp UJu/HVuhw+18SlqHypdy9BfT588/y4C/ciZe1seUKjq8iXD6jjrGYU7cKcleu5QRmK9U /y1PAS/OnxMks/SxniT/EXD5Up6mnrit8vd2z2gdWrC1m/3qgqM8hTZ71b8gQqeziell pJpI9Qdxlj8tAhY1bvlvo6ErlF2AP3xn+kDzTsbXYeu/3z1ux9HNXgd6kFx4SVSZaElM NKEw== X-Received: by 10.202.173.198 with SMTP id w189mr1951370oie.27.1418925028500; Thu, 18 Dec 2014 09:50:28 -0800 (PST) Original-Received: by 10.76.26.162 with HTTP; Thu, 18 Dec 2014 09:50:28 -0800 (PST) Original-Received: by 10.76.26.162 with HTTP; Thu, 18 Dec 2014 09:50:28 -0800 (PST) In-Reply-To: <5492FDBD.1040704@yandex.ru> X-Google-Sender-Auth: Y1CqT1LHjnQjJBqSg0GPpBL7pOg 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:97533 Archived-At: --001a113eabb4496d3c050a813a5f Content-Type: text/plain; charset=UTF-8 On 18 Dec 2014 14:15, "Dmitry Gutov" wrote: > > On 12/18/2014 05:47 PM, Artur Malabarba wrote: >> >> In retrospect, the cleanest way to do do all this would have been to >> build this reloading into `require' and `provide' (something would > > > I dunno, seems like if `require' has to consult `find-library-name' each time, it would lower its performance. > > Maybe even perceptibly, since it's called a lot. There's a way we can implement this so that find library and file-truename have to be called exactly once per require (and file-truename is called once per provide). Yes, there will be a performance hit, but one could argue that is the way require should have been done from the start (the "right way"). I don't think this performance hit will be noticeable during regular package loading. How expensive is it to call find-library and file-truename once per require, compared to the time it takes to actually load (possibly byte-compile) the entire library that's calling these requires? The performance difference will certainly be noticeable during package-initialize. Like I mentioned above, that's an important issue. --001a113eabb4496d3c050a813a5f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 18 Dec 2014 14:15, "Dmitry Gutov" <dgutov@yandex.ru> wrote:
>
> On 12/18/2014 05:47 PM, Artur Malabarba wrote:
>>
>> In retrospect, the cleanest way to do do all this would have been = to
>> build this reloading into `require' and `provide' (somethi= ng would
>
>
> I dunno, seems like if `require' has to consult `find-library-name= ' each time, it would lower its performance.
>
> Maybe even perceptibly, since it's called a lot.

There's a way we can implement this so that find library= and file-truename have to be called exactly once per require (and file-tru= ename is called once per provide).
Yes, there will be a performance hit, but one could argue that is the way r= equire should have been done from the start (the "right way").

I don't think this performance hit will be noticeable du= ring regular package loading. How expensive is it to call find-library and = file-truename once per require, compared to the time it takes to actually l= oad (possibly byte-compile) the entire library that's calling these req= uires?

The performance difference will certainly be noticeable duri= ng package-initialize. Like I mentioned above, that's an important issu= e.

--001a113eabb4496d3c050a813a5f--