From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: Convert README.org to plain text README while installing package Date: Thu, 09 Jun 2022 11:11:12 +0800 Message-ID: <87o7z2zg33.fsf@localhost> References: <87leuca7v7.fsf@disroot.org> <87czfopmsd.fsf@gnu.org> <87h74ztshe.fsf@gmx.de> <871qw31ois.fsf@yahoo.com> <878rqb5egg.fsf@localhost> <87czfjs4h4.fsf@localhost> <837d5r5jfb.fsf@gnu.org> <87leu7qkym.fsf@localhost> <87r13zyxax.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18005"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , luangruo@yahoo.com, michael.albinus@gmx.de, acm@muc.de, stefan@marxist.se, tsdh@gnu.org, akib@disroot.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 09 05:12:37 2022 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 1nz8b7-0004Wv-4D for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Jun 2022 05:12:37 +0200 Original-Received: from localhost ([::1]:59466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nz8b5-00018b-V8 for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Jun 2022 23:12:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nz8ZJ-00085O-Ni for emacs-devel@gnu.org; Wed, 08 Jun 2022 23:10:45 -0400 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:46073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nz8Z9-000437-KK; Wed, 08 Jun 2022 23:10:45 -0400 Original-Received: by mail-pj1-x102b.google.com with SMTP id w2-20020a17090ac98200b001e0519fe5a8so19952965pjt.4; Wed, 08 Jun 2022 20:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=dIVzaahQCMZDjyxFN5daFBqAe7pU/kM1UYtXcQg0LgY=; b=L5ljV8BYhL6R4wdlQXSwnU8pW3E9WCi/ny/QVzh9yXMwq9JOMKeqAmWImEEhgeFNuX ctuZYjHcPDRMYKTd9Q3ieapcsGYlAnNlju2IfY4TdoXBPk/+CWh/arxq8DlQVkm0+yrg uBHzEtgh0SfHxaH7PdAOpC86DuSL8w3+/5GEyrVtymlCUW3VcdX8vgZmw2XFEB0qYhWt TYa/jKfVOZYk07hZfkloM45f4QjykXbddzGgmPXRXovYovcfPYVshWWzLkocH6PTSYIO qFAEUXojZV+aOLJlziisfo0fMyAM09oN93TqjrZVDaMaHVqYqmUnlkM7H4T0tlyQijnR xTog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=dIVzaahQCMZDjyxFN5daFBqAe7pU/kM1UYtXcQg0LgY=; b=ptLvXAn5QT1jlhxTNXeYat5WFais9Irr0cuJiSlkom0X+dOHmhBHrq8L1rO8Q6kZov 44SCLJxQyU2CiwuLVPTDw/gI46+gDZIPJukiO3nmTqIyddpZyXJ8NTj8fWZFgVuEkYQm oP79kAHyI0cUZAF5qklJNtoUi3YT8cX6zkKOTN7CplCZeB6xu6BU+JqnJEiyyIWcKaFW xGXguFZe3YYSaYqsIXoRYDdzOIjbanwMv3Z2CRI7mfMmHAF2aGKnPQPBXYht7mrgHSd1 XjE6KZnBNI+SXv+WiC2QlLFXk/8UFrALAqqXxk1NdOAoRCZvY76KhAIFaLyqbtbynLIY uRew== X-Gm-Message-State: AOAM531QwcOe8KQ196oskofMufXt8GnJnTv/F3o3T1/3z6j7U/pRDqPQ zxY8txf6M7mzjvzltnRxSIQ= X-Google-Smtp-Source: ABdhPJzjqOI86LCElNlEHc0Yy51tnKK9j5K+27twyAUdCcG6iyR3wbYD9xNqr47J3rDgGT6lAe238w== X-Received: by 2002:a17:902:ec84:b0:167:6f74:ba76 with SMTP id x4-20020a170902ec8400b001676f74ba76mr22600553plg.17.1654744233058; Wed, 08 Jun 2022 20:10:33 -0700 (PDT) Original-Received: from localhost ([64.32.23.62]) by smtp.gmail.com with ESMTPSA id d12-20020aa7814c000000b0051877c10ec4sm16391533pfn.175.2022.06.08.20.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 20:10:32 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:290957 Archived-At: Stefan Monnier writes: > I've still found it useful to help figure out in which part of the code > most of the allocation takes place, but you need to supplement it > without your own knowledge of what the code does :-( Unfortunately, the profiler (both cpu and mem) is particularly useless when I try to measure loading time. For example, my last profiler run on Emacs-29 + native-comp yielded the following: Elapsed time: 0.505677s (0.295615s in 23 GCs) Memory: 32,661,616 98% - command-execute 32,378,659 97% - funcall-interactively 28,537,695 86% - eval-last-sexp 28,537,695 86% - elisp--eval-last-sexp 28,470,377 86% - progn 28,470,377 86% - let 28,469,646 86% - progn 26,927,800 81% - org-mode 18,457,233 55% - org-load-modules-maybe 18,113,241 54% + require 7,294,107 22% - byte-code 4,198,028 12% + require CPU: 251 79% - command-execute 230 72% - funcall-interactively 225 70% - eval-last-sexp 225 70% - elisp--eval-last-sexp 225 70% - progn 225 70% - let 225 70% - progn 218 68% - org-mode 158 49% - org-load-modules-maybe 148 46% - require 148 46% - byte-code 129 40% - require 129 40% - byte-code 119 37% - require 119 37% - byte-code Sure, loading appears to take a lot of time, but loading of which file? The profiler gives no answer whatsoever. I went as far as stripping all the requires from org.el and removing all but defun/defvar/defcustom statements. Still, the loading time was almost 0.3 sec with no easy way to tell which part is creating the bottleneck. In summary, I see no other way of speeding up Org loading than splitting org.el and other big files into modules and hoping for the best. A practical interim solution could be doing (require 'org) in init.el Given that Org mode is compiled and loaded on Emacs startup, the loading generally takes a 0.3-0.5 seconds, which is much better compared to 5.1 seconds reported by Eli. Best, Ihor