Subject: Re: bug#71454: 30.0.50; Performance issues with font selection

From: Jim Porter <[email-masked]>
Date: Mon, 10 Jun 2024 09:31:53 -0700

On 6/10/2024 4:53 AM, Eli Zaretskii wrote:
> My crystal ball says that the expensive part here is character
> composition.  The above characters belong to scripts that require
> extensive composition rules, take a look at indian.el and its complex
> regexps.

That would show up in a profile, right? Here's what I get when I start 
"emacs -Q", start profiling, and then call "C-h v 
comint-password-prompt-regexp RET". It's not the most interesting 
profile since most of it is probably in C code. I do see 
'auto-compose-chars' in there, however it's got ~0% of the samples from 
the profiler.

I haven't had time to dig into this in any great depth, so this profile 
may of course turn out to be entirely useless...

          910  98% - command-execute
          907  98%  - funcall-interactively
          907  98%   - describe-variable
          907  98%    - help--window-setup
          905  98%     - help-window-setup
            2   0%      - help-window-display-message
            2   0%         auto-compose-chars
            1   0%     - #<compiled 0x14e8696a6b1e2e3f>
            1   0%      - cl-prin1-to-string
            1   0%       - byte-code
            1   0%        - cl-generic-define-method
            1   0%         - cl--generic-make-function
            1   0%          - cl--generic-make-next-function
            1   0%           - cl--generic-get-dispatcher
            1   0%            - byte-compile
            1   0%             - #<subr 
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_50>
            1   0%                byte-compile-top-level
            1   0%       help-make-xrefs
            3   0%  - byte-code
            2   0%   - read-extended-command
            2   0%    - read-extended-command-1
            2   0%       completing-read-default
            1   0%   - variable-at-point
            1   0%    - find-tag-default
            1   0%       find-tag-default-bounds
           10   1% - ...
            9   0%    Automatic GC
            1   0%  - completion--in-region
            1   0%   - #<compiled -0x68df6976d72fd66>
            1   0%    - apply
            1   0%     - #<compiled -0x1e70b1692b6b395e>
            1   0%      - completion--in-region-1
            1   0%       - completion--do-completion
            1   0%        - completion-try-completion
            1   0%         - completion--nth-completion
            1   0%          - completion--some
            1   0%           - #<compiled 0x3d94d2d3a4c0012>
            1   0%            - completion-basic-try-completion
            1   0%             - completion-boundaries
            1   0%              - help--symbol-completion-table
            1   0%               - help--load-prefixes
            1   0%                - load
            1   0%                   byte-code