unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52593: 28.0.90; (thing-at-point thing) has so much overhead since commit 7db376e560448e61485ba054def8c82b21f33d6a
@ 2021-12-18  5:59 Kang Niu
  2021-12-18  7:48 ` Eli Zaretskii
  0 siblings, 1 reply; 22+ messages in thread
From: Kang Niu @ 2021-12-18  5:59 UTC (permalink / raw)
  To: 52593

[-- Attachment #1: Type: text/plain, Size: 2062 bytes --]

1. emacs -q
2. Load a elpa package, symbol-overlay, which has
symbol-overlay-post-command in post-command-hook
3. Open a file buffer, enable symbol-overlay-mode
4. Hold C-n, symbol-overlay-post-command will call thing-at-point
frequently and the cpu profiler-report is as follows

     Samples    %   Function
       29500  93% - symbol-overlay-post-command
       29497  93%  - if
       29480  93%   - string=
       29474  93%    - symbol-overlay-get-symbol
       29471  93%     - or
       29466  93%      - thing-at-point
       29447  93%       - save-restriction
       29129  92%          narrow-to-region
           309   0%        + let
             13   0%   + symbol-overlay-remove-temp
         1388   4% + command-execute
           269   0% + redisplay_internal (C function)
           216   0% + ...
           191   0% + timer-event-handler
             20   0% + internal-timer-start-idle
             15   0%   jit-lock--antiblink-post-command
             11   0% + undo-auto--add-boundary
               4   0% + clear-minibuffer-message

The cpu profiler-report of the same process with thingatpt.el before
commit 7db376e560448e61485ba054def8c82b21f33d6a is as follows:

    Samples    %   Function
        3859  42% + redisplay_internal (C function)
        2895  31% + command-execute
         892   9% + ...
         689   7% + timer-event-handler
         618   6% - symbol-overlay-post-command
         611   6%  - if
         576   6%   - string=
         563   6%    - symbol-overlay-get-symbol
         563   6%     - or
         557   6%      - thing-at-point
         557   6%       - let
         545   5%        - cond
         510   5%         - let
         493   5%          - bounds-of-thing-at-point
         493   5%           - if
         478   5%            - let
         471   5%             - condition-case
         471   5%              - progn
         451   4%               - save-excursion
         261   2%                + funcall
         182   2%                + let
             4   0%              get

[-- Attachment #2: Type: text/html, Size: 2688 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2021-12-24 22:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-18  5:59 bug#52593: 28.0.90; (thing-at-point thing) has so much overhead since commit 7db376e560448e61485ba054def8c82b21f33d6a Kang Niu
2021-12-18  7:48 ` Eli Zaretskii
     [not found]   ` <CAOa1fPsPmyHpzyT8AUzkc4vFGCJXgWJ3NVjGg=99hF4b8AuaWQ@mail.gmail.com>
2021-12-19 13:26     ` Eli Zaretskii
2021-12-19 13:35       ` Lars Ingebrigtsen
2021-12-19 14:39         ` Kang Niu
2021-12-19 14:44           ` Lars Ingebrigtsen
2021-12-19 15:19             ` Kang Niu
2021-12-19 15:37               ` Kang Niu
2021-12-19 15:49                 ` Lars Ingebrigtsen
2021-12-19 15:55                   ` Lars Ingebrigtsen
2021-12-19 16:14                     ` Lars Ingebrigtsen
     [not found]                       ` <CAOa1fPuD=gVEF-SKtvuu4jkzu3p40xUBoejBjUrv-v0kDrc0qg@mail.gmail.com>
2021-12-20  9:24                         ` Lars Ingebrigtsen
2021-12-19 16:22       ` Lars Ingebrigtsen
2021-12-19 17:21         ` Lars Ingebrigtsen
2021-12-19 17:33           ` Lars Ingebrigtsen
2021-12-19 17:38             ` Eli Zaretskii
2021-12-20  9:23               ` Lars Ingebrigtsen
2021-12-20 17:23                 ` Eli Zaretskii
2021-12-21 11:03                   ` Lars Ingebrigtsen
2021-12-22  2:44       ` Kang Niu
2021-12-22 12:52         ` Lars Ingebrigtsen
2021-12-24 22:43           ` bug#52593: [External] : " Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).