emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert README.org to plain text README while installing package


From: Ihor Radchenko
Subject: Re: Convert README.org to plain text README while installing package
Date: Thu, 09 Jun 2022 11:11:12 +0800

Stefan Monnier <monnier@iro.umontreal.ca> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]