ema2159 / centaur-tabs

Emacs plugin aiming to become an aesthetic, modern looking tabs plugin
GNU General Public License v3.0
727 stars 50 forks source link

slowdown cursor movement #200

Open 11111000000 opened 1 year ago

11111000000 commented 1 year ago

it slowdown cursor movement in buffer

jcs090218 commented 2 months ago

Can you elaborate more on the problem? This package has no impact on the cursor movement. 🤔

Sylk1-9 commented 2 weeks ago

I think I have the same problem.

Usually, no issue with centaur tab. But when I open a file stored on a partition mounted via sshfs, the cursor is slow in any (local or remote) buffer of emacs. Actually, the overall reactivity of emacs is slow.

I ran a profiling, and identified centaur-tab as the source of the problem. Deactivating centaur tab mode restore the cursor speed (and overall emacs reactivity) to it normal state.

Centaur tab + sshfs seems to be the issue here.

Results of profiling:

      1950  74% - redisplay_internal (C function)
        1946  73%  - eval
        1946  73%   - centaur-tabs-line
        1943  73%    - centaur-tabs-current-tabset
        1943  73%     - centaur-tabs-buffer-tabs
        1932  73%      - centaur-tabs-buffer-update-groups
        1893  71%       - cl-mapcar
        1591  60%        - #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_37>
        1575  59%         - centaur-tabs-buffer-groups
        1403  53%          - centaur-tabs-project-name
        1394  52%           - project-current
        1394  52%            - project--find-in-directory
        1394  52%             - project-try-vc
         756  28%              - project--value-in-dir
         713  27%               - hack-dir-local-variables-non-file-buffer
         707  26%                - hack-dir-local-variables
         707  26%                 - hack-dir-local--get-variables
         699  26%                  - dir-locals-find-file
         527  20%                     locate-dominating-file
          35   1%               - #<compiled -0x1c84497813bdcbf3>
           7   0%                - kill-buffer
           5   0%                 - replace-buffer-in-windows
           5   0%                  - unrecord-window-buffer
           5   0%                     assq-delete-all
         373  14%              - locate-dominating-file
         326  12%                 #<compiled 0x15c08eb59410dc67>
          18   0%                #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>
           5   0%              - cl-find-if
           5   0%                 cl-find
           2   0%                #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_22>
          21   0%          - derived-mode-p
          17   0%           - provided-mode-derived-p
          14   0%              apply
          17   0%       - centaur-tabs-buffer-list
           7   0%          cl-mapcar
           6   0%        - centaur-tabs-filter-out
           6   0%         - cl-mapcar
           3   0%            #<compiled -0x14ab2388ba770cb1>
           4   0%  - mode-line-default-help-echo
           4   0%   - window-at-side-p
           4   0%      window-pixel-edges

P.S.: thanks for the amazing work on this project!

jcs090218 commented 2 weeks ago

Yeah, the project finding is very slow with the Tramp. Projectile has a similar issue; see https://github.com/bbatsov/projectile/issues/1232.