From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: interactive feel of Emacs: the need for speed, and -Q [measure.el] Date: Wed, 15 Apr 2020 16:43:58 +0100 Message-ID: <87sgh4ah4x.fsf@tcd.ie> References: <87tv26qvwh.fsf@ebih.ebihd> <87mu7njm9h.fsf@ebih.ebihd> <87h7xv44xr.fsf@md5i.com> <875zeasexm.fsf@ebih.ebihd> <87d08i3vvk.fsf@md5i.com> <87h7xph5a4.fsf@ebih.ebihd> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="46014"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 15 17:44:36 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jOkDM-000Brx-Jq for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Apr 2020 17:44:36 +0200 Original-Received: from localhost ([::1]:51950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOkDL-0000Qy-Mh for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Apr 2020 11:44:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57841) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOkCq-0008S3-LF for emacs-devel@gnu.org; Wed, 15 Apr 2020 11:44:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOkCp-0003xe-JT for emacs-devel@gnu.org; Wed, 15 Apr 2020 11:44:04 -0400 Original-Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:38403) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOkCp-0003vy-5b for emacs-devel@gnu.org; Wed, 15 Apr 2020 11:44:03 -0400 Original-Received: by mail-ed1-x531.google.com with SMTP id e5so5483724edq.5 for ; Wed, 15 Apr 2020 08:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=K61g9KeCak0GqJmEGkPGjqU7QVG06ed1zGD6A7/853E=; b=mCuLA9iyVNkX7b8iP6b7Mh/eYdE7ouHc61zyvU4PsbxamCsJNISI0oc4w04Ax7HhES AUHXJRA97BlH8xKMiPYmBBO2jn3AEbSDPkdi2/pxdeQdX7p0pRM6dnv91HYv626rpAPd +MA6WtinMyDC9KlB8PW5+SynZTWjYB9PVsLiQpT9s5FghWF7tNmHn0Xs2Qy2ueN/64BD CMjTNl+91oQmVrAo20kU4EZpJ5rqYiB9akNo8+VIBooCQQuXDQq6WY/ukABZ+2W6ajQ7 LVZ0NYSnFBzGlgR36m9WCttvcJHpAYHFw8fA7dK/h3NfMn2jyWNd8ssLksjiomjfCGxL cjkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=K61g9KeCak0GqJmEGkPGjqU7QVG06ed1zGD6A7/853E=; b=DPJ6YNpVRfwf1bLiVUUIY4GYrByTM3bzH2Zt2tgIP4oBOuk62sV8YgcTc+MF0mzHdU HeDa0cBjdLXXWP1EFqvbbNMZOYkTj4sLkjGp5KRvg39BymBgVCGeh0631EOLOWD5ATMY PrKm2ie1ugtTENBq4jBnWMWzUlpzxUVCunSJ+G4CEdV711fCe0UJ4xFJ0+oo2q8NWjeX 4YKsSV1fxhNmmw+l7HY6J1neE9kixU1RpyTuaSA47WkiUdfR2l+Ki7i/0wuI1/oKz05t AkaI3mEf5nxCjX3D1pcJ8dCWUCU6i9QCES+AtY12DwMYoQEFoquY6zVwCrpgftOVQmfE b/NQ== X-Gm-Message-State: AGi0PuZHkiBIs8uvcJPI9qAh6iwbU8P4nZ2w//LfY5a2EA2SKoAL+eSy dYCNDuZML+wu+I5NKoXnEq0OPJTIwa8= X-Google-Smtp-Source: APiQypIzhPaGHTytNP8fY8XwcUZm8Xa79nIJbSJriqKfSMLq8pd0mLTOghJNTwMZRMeyc2fc4wNAXw== X-Received: by 2002:aa7:ce96:: with SMTP id y22mr25389119edv.230.1586965439981; Wed, 15 Apr 2020 08:43:59 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id bs8sm2653829ejb.92.2020.04.15.08.43.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 08:43:59 -0700 (PDT) In-Reply-To: <87h7xph5a4.fsf@ebih.ebihd> (Emanuel Berg via "Emacs development discussions."'s message of "Sun, 12 Apr 2020 03:16:51 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::531 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247026 Archived-At: Emanuel Berg via "Emacs development discussions." writes: > Here are my requires: > > (require 'ada-mode) > (require 'apropos) > (require 'bibtex) > (require 'cc-mode) > (require 'checkdoc) > (require 'cl-lib) > (require 'comint) > (require 'compile) > (require 'css-mode) > (require 'debug) > (require 'dired) > (require 'dired-x) > (require 'erc) > (require 'erc-button) > (require 'erc-fill) > (require 'erc-match) > (require 'erc-ring) > (require 'erc-stamp) > (require 'gnus) > (require 'gnus-art) > (require 'gnus-cite) > (require 'gnus-group) > (require 'gnus-msg) > (require 'gnus-score) > (require 'gnus-srvr) > (require 'gnus-start) > (require 'gnus-sum) > (require 'google-translate-core-ui) > (require 'help-mode) > (require 'ielm) > (require 'info) > (require 'ispell) > (require 'lpr) > (require 'man) > (require 'map) > (require 'message) > (require 'netrc) > (require 'nnmail) > (require 'nroff-mode) > (require 'package) > (require 'parse-time) > (require 'search-regexp-in-files) > (require 'seq) > (require 'sgml-mode) > (require 'shell) > (require 'slime) > (require 'slime-autoloads) > (require 'slime-presentations) > (require 'slime-repl) > (require 'smtpmail) > (require 'sort) > (require 'subr-x) > (require 'tex-mode) > (require 'thingatpt) > (require 'tls) > (require 'tramp) > (require 'w3m) > (require 'w3m-bookmark) > (require 'w3m-form) > (require 'w3m-search) > (require 'w3m-session) FWIW eagerly loading such a non-trivial amount of large packages is very likely to be slow, even if each one comprises only top-level definitions. Simply loading Gnus alone can take upwards of 500ms on my machine. Occasionally less well-behaved packages execute non-trivial code at top-level, thus incurring a further cost when loading them. For faster initialisation, try to avoid loading packages until they are needed. A couple of features that can help with this are autoloading[1] and with-eval-after-load[2]. [1]: (info "(elisp) Autoload") [2]: (info "(elisp) Hooks for Loading") -- Basil