From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#19390: 25.0.50; `package-activate' is too slow Date: Thu, 18 Dec 2014 23:31:30 -0500 Message-ID: References: <86a92oddfp.fsf@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> <549314D7.8070106@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418963550 31523 80.91.229.3 (19 Dec 2014 04:32:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2014 04:32:30 +0000 (UTC) Cc: 19390@debbugs.gnu.org, Dmitry Gutov To: Artur Malabarba Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 19 05:32:22 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 1Y1pEk-00081S-8d for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Dec 2014 05:32:22 +0100 Original-Received: from localhost ([::1]:56827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1pEj-00053o-2u for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Dec 2014 23:32:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1pEY-000536-J9 for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 23:32:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1pER-0004dx-2n for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 23:32:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1pEQ-0004dl-W8 for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 23:32:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y1pEQ-0006Dz-ID for bug-gnu-emacs@gnu.org; Thu, 18 Dec 2014 23:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Dec 2014 04:32: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.141896349423890 (code B ref 19390); Fri, 19 Dec 2014 04:32:02 +0000 Original-Received: (at 19390) by debbugs.gnu.org; 19 Dec 2014 04:31:34 +0000 Original-Received: from localhost ([127.0.0.1]:50708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1pDy-0006DF-7Q for submit@debbugs.gnu.org; Thu, 18 Dec 2014 23:31:34 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:36294) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y1pDv-0006D6-Ip for 19390@debbugs.gnu.org; Thu, 18 Dec 2014 23:31:32 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCw4mEhQYDSSISgnWWQEBAQEBAQQBAQEBHpBvB4RIBYsBjFUFl1SBeIQZIYJ3AQEB X-IPAS-Result: Aj8PAOwQflTO+ILA/2dsb2JhbABbgweDYIVawjuCYgQCAoEkFwEBAQEBAXyEAwEBAwFWIwULCw4mEhQYDSSISgnWWQEBAQEBAQQBAQEBHpBvB4RIBYsBjFUFl1SBeIQZIYJ3AQEB X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="102951564" Original-Received: from 206-248-130-192.dsl.teksavvy.com (HELO ceviche.home) ([206.248.130.192]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Dec 2014 23:31:30 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 4A61B660DC; Thu, 18 Dec 2014 23:31:30 -0500 (EST) In-Reply-To: (Artur Malabarba's message of "Thu, 18 Dec 2014 17:13:31 -0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:97557 Archived-At: > `require' is only ever called as part of loading package (or doing > some other processing). There are a few places where we `require' inside a function that can be called repeatedly, on the assumption that in most cases, this `require' will be "instantaneous". I'd rather not re-consider this performance choice. I'm OK with slowing down require like you suggested (that was actually my original suggestion to handle the byte-compilation breakage during package upgrade), but then we'd only want to do it in some specific contexts (during byte-compilation) rather than all the time. > When `autoload' is called, if the function in question is completely > defined (instead of not defined or just autoloaded), `autoload' will > check if the file it was given is a different file from the one the > function was defined in (when we know that file). > If it is then all is fine, if it wasn't then it loads the new file. So we first add handling for `require', then another for `autoload', ... in the end I can't believe it can be simpler than what we have (which has 0 cost in normal use, and a very small extra cost during package upgrade). Stefan