Git Product home page Git Product logo

Comments (7)

wasamasa avatar wasamasa commented on August 24, 2024

Please record a profiler run, otherwise it's impossible to tell what the problem is:

  • M-x profiler-start, pick the CPU option
  • Reproduce the slowness, ideally for prolonged time
  • M-x profiler-report
  • C-u TAB
  • Copy the whole report and attach it into your reply
  • M-x profiler-stop

from yaml-mode.

ZelphirKaltstahl avatar ZelphirKaltstahl commented on August 24, 2024
- command-execute                                                2497  95%
 - call-interactively                                            2497  95%
  - next-line                                                    2439  93%
   - funcall                                                     2439  93%
    - #<compiled 0x437913>                                       2439  93%
     - line-move                                                 2439  93%
      - line-move-partial                                        2400  91%
       - default-line-height                                       36   1%
          default-font-height                                      36   1%
       - window-screen-lines                                       14   0%
        - default-line-height                                      14   0%
           default-font-height                                     12   0%
         default-font-height                                       12   0%
       - pos-visible-in-window-p                                    9   0%
          file-remote-p                                             7   0%
        - eval                                                      2   0%
           if                                                       2   0%
       - posn-at-point                                              2   0%
        - eval                                                      2   0%
           if                                                       2   0%
        line-move-visual                                           19   0%
      - default-line-height                                        12   0%
         default-font-height                                       12   0%
  - byte-code                                                      27   1%
   - read-extended-command                                         27   1%
    - completing-read                                              27   1%
     - completing-read-default                                     27   1%
      - read-from-minibuffer                                       25   0%
       - timer-event-handler                                        1   0%
          timer-activate-when-idle                                  1   0%
  - minibuffer-complete                                            26   0%
   - completion-in-region                                          26   0%
    - completion--in-region                                        26   0%
     - #<compiled 0xa18fbb>                                        26   0%
      - apply                                                      26   0%
       - #<compiled 0x247e21>                                      26   0%
        - completion--in-region-1                                  26   0%
         - completion--do-completion                               26   0%
          - completion-try-completion                              23   0%
           - completion--nth-completion                            23   0%
            - completion--some                                     23   0%
             - funcall                                             23   0%
              - #<compiled 0xa16b97>                               23   0%
               - #<compiled 0xa16f9b>                              23   0%
                  completion-basic-try-completion                  23   0%
          - minibuffer-completion-help                              3   0%
           - completion-all-completions                             3   0%
            - completion--nth-completion                            3   0%
             - completion--some                                     3   0%
              - funcall                                             3   0%
               - #<compiled 0x9efd2b>                               3   0%
                - #<compiled 0x9f012f>                              3   0%
                 - completion-basic-all-completions                  3   0%
                    completion-pcm--all-completions                  3   0%
  - execute-extended-command                                        5   0%
   - command-execute                                                5   0%
    - call-interactively                                            5   0%
     - profiler-report                                              5   0%
      - profiler-report-cpu                                         5   0%
         profiler-cpu-profile                                       5   0%
- redisplay_internal (C function)                                  62   2%
 - jit-lock-function                                               62   2%
  - jit-lock-fontify-now                                           62   2%
   - funcall                                                       62   2%
    - #<compiled 0x9d8b77>                                         62   2%
     - run-hook-with-args                                          62   2%
      - font-lock-fontify-region                                   62   2%
       - font-lock-default-fontify-region                          62   2%
        - font-lock-fontify-keywords-region                        35   1%
           yaml-font-lock-block-literals                           10   0%
           whitespace-trailing-regexp                              10   0%
        - font-lock-fontify-syntactically-region                   27   1%
           looking-back                                            10   0%
- ...                                                              42   1%
   Automatic GC                                                    42   1%
- whitespace-post-command-hook                                     14   0%
   jit-lock-refontify                                              14   0%
- delete-selection-pre-hook                                         4   0%
   use-region-p                                                     4   0%

from yaml-mode.

ZelphirKaltstahl avatar ZelphirKaltstahl commented on August 24, 2024

And here is the profiling in emacs -Q:

- command-execute                                                  81  85%
 - call-interactively                                              81  85%
  - byte-code                                                      35  36%
   - read-extended-command                                         35  36%
    - completing-read                                              35  36%
     - completing-read-default                                     35  36%
        read-from-minibuffer                                       27  28%
  - next-line                                                      24  25%
   - funcall                                                       11  11%
    - #<compiled 0x49ee9f>                                         11  11%
     - line-move                                                   11  11%
      - line-move-partial                                           6   6%
       - default-line-height                                        6   6%
          default-font-height                                       6   6%
      - default-line-height                                         4   4%
         default-font-height                                        4   4%
        line-move-visual                                            1   1%
  - minibuffer-complete                                            20  21%
   - completion-in-region                                          20  21%
    - completion--in-region                                        20  21%
     - #<compiled 0x4d0833>                                        20  21%
      - apply                                                      20  21%
       - #<compiled 0x247e21>                                      20  21%
        - completion--in-region-1                                  20  21%
         - completion--do-completion                               20  21%
          - minibuffer-completion-help                             15  15%
           - completion-all-completions                            11  11%
            - completion--nth-completion                           11  11%
             - completion--some                                    11  11%
              - funcall                                            11  11%
               - #<compiled 0x4d1c3b>                              11  11%
                - #<compiled 0x4d1843>                             11  11%
                 - completion-basic-all-completions                 11  11%
                    completion-pcm--all-completions                 11  11%
           - internal-temp-output-buffer-show                       4   4%
            - display-buffer                                        4   4%
             - display-buffer--maybe-pop-up-frame-or-window                  4   4%
              - display-buffer-pop-up-window                        4   4%
               - window--try-to-split-window                        4   4%
                - funcall                                           4   4%
                 - split-window-sensibly                            4   4%
                  - split-window-below                              4   4%
                   - split-window                                   4   4%
                    - byte-code                                     4   4%
                     - window--check                                4   4%
                      - window--side-check                          4   4%
                       - byte-code                                  4   4%
                        - walk-window-tree                          4   4%
                           walk-window-tree-1                       4   4%
          - completion-try-completion                               5   5%
           - completion--nth-completion                             5   5%
            - completion--some                                      5   5%
             - funcall                                              5   5%
              - #<compiled 0x2f906b>                                5   5%
               - #<compiled 0x71f17f>                               5   5%
                  completion-basic-try-completion                   5   5%
  - execute-extended-command                                        2   2%
   - command-execute                                                2   2%
    - call-interactively                                            2   2%
     - profiler-report                                              2   2%
      - profiler-report-cpu                                         2   2%
         profiler-cpu-profile                                       2   2%
- redisplay_internal (C function)                                   5   5%
 - and                                                              4   4%
  - or                                                              4   4%
     and                                                            4   4%
 - eval                                                             1   1%
    if                                                              1   1%
- timer-event-handler                                               5   5%
 - timer-activate                                                   5   5%
  - timer--activate                                                 5   5%
     timerp                                                         5   5%
- ...                                                               4   4%
   Automatic GC                                                     4   4%

from yaml-mode.

wasamasa avatar wasamasa commented on August 24, 2024

Hm, doesn't look particularly enlightening. Could you try running a minimal session with emacs -Q, then enable packages with M-x package-initialize, open a YAML file, enable yaml-mode and then try reproducing the problem? If it's gone in that configuration and otherwise present, chances are you've enabled something in your own personal config that makes line movement a lot slower.

from yaml-mode.

ZelphirKaltstahl avatar ZelphirKaltstahl commented on August 24, 2024

The issue does not appear when I do that, so I think you are right. It seems to be something else related to YAML in my emacs configuration.

from yaml-mode.

wasamasa avatar wasamasa commented on August 24, 2024

OK, feel free to write here again if you manage finding the culprit via bisection.

from yaml-mode.

ZelphirKaltstahl avatar ZelphirKaltstahl commented on August 24, 2024

The issue is with a theme. I fiddled around with the emacs desktop file, because I tried to disable all themes. Although I commented them out in my init.el file, emacs still loaded the theme. When I commented out (desktop-save-mode 1), it did not do that anymore. So I figured I'd simply delete the emacs desktop file and reopen all my buffers, to get rid of the theme. When I open the YAML file without theme, the high CPU usage does not happen anymore. When I reenable the theme, the CPU usage is there again.
The theme is suscolors.

from yaml-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.