emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.73k stars 864 forks source link

High CPU usage when using texlab with flycheck #2417

Closed PythonNut closed 3 years ago

PythonNut commented 3 years ago

Describe the bug When using the texlab language server (for LaTeX) with the flycheck package, Emacs consistently uses 100% CPU, although it does not freeze. Additionally, if you enable I/O logging, you will see that there are lots of messages being exchanged with the server.

To Reproduce Open a .tex file (even an empty file will work) and run lsp when flycheck is installed. You will need texlab installed and lsp-tex-server should be set to 'texlab (i.e. the default).

Expected behavior If the user is not doing anything I would expect the CPU usage to die down after a while.

Which Language Server did you use texlab as defined in lsp-tex.el.

OS Arch Linux

yyoncho commented 3 years ago

Please follow this to report perf issue: https://emacs-lsp.github.io/lsp-mode/page/performance/#reporting-performance-problems

PythonNut commented 3 years ago

Oops sorry for the delay. In the interim some other change appears to have fixed the issue. (I tested in emacs -Q so I know it's not my config). If this ever comes back I'll reopen.

PythonNut commented 3 years ago

Actually, perhaps it is not fixed.

Setting lsp-print-performance to t and reading the lsp-log gives thousands of these:

Perf> notification
  ServerId: texlab
  Notification: textDocument/publishDiagnostics
  Deserialization: 0.000001
  Processing: 0.000654 

and also hundreds of these:

Perf> Request/Response
  ServerId: texlab
  Request: textDocument/documentLink (641)
  Serialization took: 0.000046
  ServerTime: 0.141307
  Deserialization: 0.000002
  CallbackTime: 0.000223

Here is the result from running the CPU profiler after letting Emacs sit for a while, with all nonzero entries expanded

- ...                                                            2212  41%
   Automatic GC                                                  2212  41%
- redisplay_internal (C function)                                1711  32%
 - eval                                                          1700  32%
  - lsp-modeline--diagnostics-update-modeline                    1676  31%
   - let                                                         1676  31%
    - setq                                                       1676  31%
     - cond                                                      1676  31%
      - let                                                      1676  31%
       - or                                                      1675  31%
        - let                                                    1675  31%
         - funcall                                               1675  31%
          - #<lambda 0x178ebbc9135340>                           1675  31%
           - let                                                 1675  31%
            - lsp-modeline-diagnostics-statistics                1675  31%
             - let                                               1673  31%
              - propertize                                       1670  31%
                 if                                              1670  31%
              + cond                                                2   0%
         car                                                        1   0%
  + mapconcat                                                      19   0%
  + if                                                              3   0%
 + #<compiled 0x1ff54dd3a86f>                                       4   0%
   file-remote-p                                                    3   0%
 + mode-line-default-help-echo                                      1   0%
- #<lambda 0x1c851f9903753556>                                    927  17%
 - while                                                          923  17%
  - if                                                            923  17%
   - let*                                                         922  17%
    - if                                                          919  17%
     - progn                                                      917  17%
      - let                                                       890  16%
       - lsp--parser-on-message                                   823  15%
        - condition-case                                          823  15%
         + let                                                    807  15%
       + decode-coding-string                                       1   0%
      + setq                                                       26   0%
    + and                                                           2   0%
      setq                                                          1   0%
 + setq                                                             3   0%
+ timer-event-handler                                             249   4%
+ command-execute                                                 176   3%

I really should have mentioned this earlier, but it really seems like texlab is just slamming Emacs with textDocument/publishDiagnostics as fast as it can. But interestingly the texlab process doesn't seem to be using any CPU itself.

yyoncho commented 3 years ago

Automatic GC 2212 41%

Seems like your config is off: check this - https://emacs-lsp.github.io/lsp-mode/page/performance/

PythonNut commented 3 years ago

The only setting in my config that isn't at the recommended value is probably my gc-cons-threshold. However increasing it does not cause the CPU usage to decrease. Garbage is collected less frequently, but each collection takes much longer. Tuning gc-cons-threshold can, at best, mask the root cause which is that very large amounts of garbage are being produced, even though I am simply letting Emacs sit with no user input.

Interestingly, if I do actually start typing or scrolling, the CPU usage decreases, Additionally, there does seem to be some nondeterminism involved, since I cannot always reproduce this issue.

PythonNut commented 3 years ago

I just want to clarify since my wording may be misleading: The root cause is not a performance problem, it's some sort of miscommunication with texlab which causes the language server to go into an infinite loop where it spams Emacs with textDocument/publishDiagnostics requests as fast as it can.

Potentially related issues:

lucasvreis commented 3 years ago

@PythonNut Hi, apparently I was having the same issue as you did. I tried a few different things, then saw this issue and indeed compiling and installing #408 fixed all the problems for me.

yyoncho commented 3 years ago

Based on the previous comment I am marking the issue as closed. Please reopen of this is not the case.

PythonNut commented 3 years ago

@lucasvreis that's great thanks for the heads-up. I am running Texlab 3.0 now and indeed everything is running smoothly now. I suppose this comes as no surprise since they added debouncing for the messages we were previously getting spammed with.

maikol-solis commented 6 months ago

Hi @PythonNut and @yyoncho.

I had this issue in, and it first seems a problem with texlab.

I reported upstream, and the author made a fix for the issue. With eglot everything is working fine (https://github.com/latex-lsp/texlab/issues/986)

However, if I use lsp-mode, I have the same high CPU behavior. I'm getting a lot of these

[Trace - 12:49:34 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
  "diagnostics": [],
  "uri": "file:///Users/maikol/Library/TinyTeX/texmf-dist/tex/latex/base/atveryend-ltx.sty"
}

It seems lsp-mode goes recursively to the TeX distribution looking for issues. I have numerous issues in flycheck related to those files.

WDYT?

Best.

image

texlab_lsp_mode.log

texlab_lsp_mode_2.log

yyoncho commented 6 months ago

It seems lsp-mode goes recursively to the TeX distribution looking for issues.

that is not something that lsp-mode does, but something that the server does based on the project root selection. If the perf is bad on emacs side please include the perf report as reported here: https://emacs-lsp.github.io/lsp-mode/page/performance/#reporting-performance-problems

@maikol-solis

maikol-solis commented 5 months ago

Hi! @yyoncho. I'm sorry it took me so long to reply.

Below are some diagnostics that I am receiving with lsp-mode. This problem was found in https://github.com/latex-lsp/texlab/issues/986 for a lot of packages that were loaded.

image

Also, here is a report on the CPU profile when my machine got frozen.

Best.

2954  86% - ...
1255  36%    Automatic GC
932  27%  - #<lambda 0x19b0cc206d6b2b59>
932  27%   - let*
932  27%    - cond
825  24%     - let
824  24%      - lsp--on-notification
824  24%       - let*
824  24%        - let
824  24%         - let*
824  24%          - let*
824  24%           - if
824  24%            - funcall
824  24%             - lsp--on-diagnostics
824  24%              - lsp--on-diagnostics-update-stats
824  24%               - let*
824  24%                - let
455  13%                 - mapc
451  13%                  - #<lambda 0x13fed1a156c24513>
451  13%                   - lsp--parser-on-message
451  13%                    - condition-case
451  13%                     - let
451  13%                      - let*
451  13%                       - let*
451  13%                        - cond
451  13%                         - let
451  13%                          - lsp--on-notification
451  13%                           - let*
451  13%                            - let
451  13%                             - let*
451  13%                              - let*
451  13%                               - if
450  13%                                - funcall
449  13%                                 - lsp--on-diagnostics
442  12%                                  - let*
437  12%                                   - lsp--fix-path-casing
437  12%                                    - lsp--uri-to-path
437  12%                                     - let*
437  12%                                      - if
437  12%                                       - lsp--uri-to-path-1
436  12%                                        - let*
417  12%                                         - url-generic-parse-url
416  12%                                          - #<compiled -0x1c1df230e69c9007>
2   0%                                           - kill-buffer
2   0%                                            - replace-buffer-in-windows
1   0%                                             - unrecord-window-buffer
1   0%                                                assq-delete-all
4   0%                                           concat
2   0%                                     let
1   0%                                   - if
1   0%                                    - seq-empty-p
1   0%                                       apply
1   0%                                   - run-hooks
1   0%                                    - lsp-diagnostics--flycheck-report
1   0%                                     - if
1   0%                                      - progn
1   0%                                       - mapc
1   0%                                        - #<lambda 0xbeedda8cf>
1   0%                                         - if
1   0%                                          - and
1   0%                                           - or
1   0%                                              and
7   0%                                  - lsp--on-diagnostics-update-stats
7   0%                                   - let*
6   0%                                    - let
5   0%                                     - mapc
5   0%                                      - function
4   0%                                       - cconv-make-interpreted-closure
1   0%                                          cconv-fv
1   0%                                       while
4   0%                  - function
4   0%                   - cconv-make-interpreted-closure
3   0%                    - macroexpand-all
3   0%                     - macroexp--expand-all
3   0%                      - macroexp--all-forms
3   0%                       - macroexp--expand-all
3   0%                        - macroexp--all-forms
3   0%                         - macroexp--expand-all
3   0%                          - macroexp--all-forms
3   0%                           - macroexp--expand-all
3   0%                            - macroexp--all-forms
3   0%                             - macroexp--expand-all
2   0%                              - macroexp--all-forms
2   0%                               - macroexp--expand-all
1   0%                                - macroexp--all-forms
1   0%                                 - macroexp--expand-all
1   0%                                    macroexp--all-forms
1   0%                              - macroexp--compiler-macro
1   0%                               - apply
1   0%                                - lsp--workspace-diagnostics--cmacro
1   0%                                 - cl-block
1   0%                                  - cl--block-wrapper
1   0%                                   - catch
1   0%                                      cl--defsubst-expand
1   0%                    - cconv-fv
1   0%                       cconv-analyze-form
336   9%                 - lsp--fix-path-casing
336   9%                  - lsp--uri-to-path
335   9%                   - let*
332   9%                    - if
332   9%                     - lsp--uri-to-path-1
332   9%                      - let*
323   9%                       - url-generic-parse-url
323   9%                        - #<compiled -0x1c1df3abf0f5e607>
3   0%                         - kill-buffer
1   0%                            replace-buffer-in-windows
1   0%                            #<compiled -0x1e223d86601054ba>
2   0%                         concat
2   0%                    - and
2   0%                     - cl-first
2   0%                        -keep
26   0%                 - while
15   0%                  - lsp-diagnostics--update-path
15   0%                   - let
11   0%                    - let*
10   0%                     - if
10   0%                      - let
10   0%                       - while
7   0%                        - let
4   0%                         - let*
4   0%                          - aset
3   0%                             +
1   0%                       and
2   0%                      lsp--fix-path-casing
11   0%                  - not
11   0%                   - string=
11   0%                    - setq
5   0%                       file-name-directory
5   0%                 - lsp-diagnostics--update-path
5   0%                  - let
3   0%                     lsp--fix-path-casing
2   0%                   - let*
2   0%                    - if
2   0%                     - let
2   0%                      - while
1   0%                         setq
1   0%                       - let
1   0%                        - let*
1   0%                           aset
2   0%                 - let*
2   0%                  - if
2   0%                   - mapc
1   0%                    - function
1   0%                       cconv-make-interpreted-closure
1   0%                    - #<lambda 0x19b90f1845cf5a4>
1   0%                       let*
1   0%      - let
1   0%       - lsp-notify
1   0%        - lsp--send-notification
1   0%         - mapcar
1   0%          - #<lambda 0x8fb3c9e33bd4db0>
1   0%           - let
1   0%            - lsp--send-no-wait
1   0%             - lsp-process-send
1   0%              - apply
1   0%               - #<lambda -0xfb48db7f5271d12>
1   0%                - progn
1   0%                   condition-case
107   3%     - complete-with-action
107   3%      - funcall
107   3%       - #<lambda -0x174e6280f63526bf>
107   3%        - let
107   3%         - catch
107   3%          - let
107   3%           - cond
107   3%            - let*
107   3%             - lsp-request-while-no-input
107   3%              - if
107   3%               - let*
107   3%                - unwind-protect
107   3%                 - progn
107   3%                  - while
106   3%                   - catch
91   2%                    - sit-for
51   1%                     - timer-event-handler
51   1%                      - apply
50   1%                       - company--sneaky-refresh
4   0%                        - redisplay_internal (C function)
3   0%                         - eval
2   0%                          - breadcrumb--header-line
2   0%                           - funcall
2   0%                            - breadcrumb-project-crumbs
2   0%                             - breadcrumb--project-crumbs-1
2   0%                              - project-current
2   0%                               - project--find-in-directory
2   0%                                - run-hook-with-args-until-success
2   0%                                 - project-projectile
2   0%                                  - projectile-project-root
2   0%                                   - cl-some
2   0%                                      #<compiled -0xdcb5e754f88bb8d>
1   0%                         - jit-lock-function
1   0%                          - jit-lock-fontify-now
1   0%                           - jit-lock--run-functions
1   0%                            - #<compiled -0x1570e3c83a538803>
1   0%                             - font-lock-fontify-region
1   0%                              - apply
1   0%                               - polymode-inhibit-during-initialization
1   0%                                - #<subr font-lock-fontify-region>
1   0%                                 - font-latex-fontify-region
1   0%                                    font-lock-default-fontify-region
40   1%                     - #<lambda 0x1eb3aec4d9e2a464>
40   1%                      - let
40   1%                       - while
40   1%                        - if
40   1%                         - let*
39   1%                          - if
34   0%                           - progn
19   0%                            - condition-case
19   0%                             - let
18   0%                              - save-current-buffer
18   0%                               - unwind-protect
15   0%                                  and
3   0%                                - progn
2   0%                                 - setq
2   0%                                    cons
15   0%                              setq
5   0%                           - prog1
5   0%                              setq
1   0%                            and
1   0%                   - not
1   0%                      or
420  12%  - lsp--get-document-symbols
420  12%   - if
420  12%    - let
420  12%     - if
420  12%      - prog1
420  12%       - setq
420  12%        - lsp-request
420  12%         - let*
420  12%          - progn
420  12%           - if
420  12%            - let*
420  12%             - unwind-protect
420  12%              - progn
420  12%               - while
420  12%                - if
420  12%                 - catch
381  11%                  - accept-process-output
255   7%                   - #<lambda 0x1eb3aec4d9e2a464>
255   7%                    - let
255   7%                     - while
255   7%                      - if
255   7%                       - let*
251   7%                        - if
228   6%                         - progn
168   4%                          - condition-case
168   4%                           - let
165   4%                            - save-current-buffer
165   4%                             - unwind-protect
134   3%                                and
31   0%                              - progn
25   0%                               - setq
25   0%                                  cons
60   1%                          - setq
1   0%                           - lsp--get-body-length
1   0%                            - let
1   0%                               cdr
23   0%                         - prog1
23   0%                            setq
4   0%                          and
126   3%                   - timer-event-handler
126   3%                    - apply
70   2%                     - lsp--on-idle
70   2%                      - if
70   2%                       - progn
70   2%                        - run-hooks
49   1%                         - lsp--document-links
49   1%                          - if
49   1%                           - progn
49   1%                            - lsp-request-async
48   1%                             - let*
48   1%                              - progn
48   1%                               - lsp--send-request-async
48   1%                                - let*
48   1%                                 - if
48   1%                                  - let*
41   1%                                   - seq-do
40   1%                                    - mapc
40   1%                                     - #<lambda 0x10e0a0a06b3433e3>
40   1%                                      - lsp--send-no-wait
40   1%                                       - lsp-process-send
40   1%                                        - apply
40   1%                                         - #<lambda -0xfb48db7f5271d12>
40   1%                                          - progn
40   1%                                             condition-case
1   0%                                    - function
1   0%                                     - cconv-make-interpreted-closure
1   0%                                      - macroexpand-all
1   0%                                       - macroexp--expand-all
1   0%                                        - macroexp--all-forms
1   0%                                         - macroexp--expand-all
1   0%                                          - macroexp--all-forms
1   0%                                           - macroexp--expand-all
1   0%                                              macroexp--all-forms
3   0%                                   - mapc
3   0%                                    - #<lambda 0x158fd54add00d947>
3   0%                                     - let*
2   0%                                      - add-hook
2   0%                                       - lsp--create-request-cancel
2   0%                                        - function
1   0%                                         - cconv-make-interpreted-closure
1   0%                                          - macroexpand-all
1   0%                                           - macroexp--expand-all
1   0%                                            - macroexp--all-forms
1   0%                                             - macroexp--expand-all
1   0%                                              - macroexp--all-forms
1   0%                                               - macroexp--expand-all
1   0%                                                - macroexp--all-forms
1   0%                                                   macroexp--expand-all
2   0%                                   - lsp--create-async-callback
2   0%                                    - let
2   0%                                     - function
1   0%                                      - cconv-make-interpreted-closure
1   0%                                       - cconv-fv
1   0%                                        - cconv-analyze-form
1   0%                                         - cconv--analyze-function
1   0%                                          - cconv-analyze-form
1   0%                                           - cconv-analyze-form
1   0%                                              cconv-analyze-form
1   0%                                   - if
1   0%                                    - let
1   0%                                     - function
1   0%                                      - cconv-make-interpreted-closure
1   0%                                       - macroexpand-all
1   0%                                        - macroexp--expand-all
1   0%                                         - macroexp--all-forms
1   0%                                          - macroexp--expand-all
1   0%                                             macroexp--all-forms
19   0%                         - lsp-diagnostics--flycheck-buffer
19   0%                          - if
19   0%                           - progn
19   0%                            - flycheck-buffer
19   0%                             - if
18   0%                              - if
18   0%                               - condition-case
18   0%                                - let*
8   0%                                 - flycheck-get-checker-for-buffer
8   0%                                  - if
8   0%                                   - if
8   0%                                    - flycheck-may-use-checker
8   0%                                     - let
8   0%                                      - and
8   0%                                       - or
8   0%                                        - funcall
8   0%                                         - #<lambda 0x288b952c0c1113c>
8   0%                                          - let
8   0%                                           - flycheck-compute-working-directory
8   0%                                            - let*
8   0%                                               if
8   0%                                 - if
8   0%                                  - flycheck-start-current-syntax-check
8   0%                                   - let*
6   0%                                    - flycheck-syntax-check-start
6   0%                                     - let
6   0%                                      - progn
6   0%                                       - let*
6   0%                                        - aset
6   0%                                         - funcall
6   0%                                          - lsp-diagnostics--flycheck-start
6   0%                                           - funcall
6   0%                                            - -map
6   0%                                             - #<lambda -0x19eb5adfbb680bed>
6   0%                                              - let*
5   0%                                               - flycheck-error-new
3   0%                                                - lsp-diagnostics--flycheck-calculate-level
3   0%                                                 - let
3   0%                                                  - seq-map
3   0%                                                   - function
1   0%                                                    - cconv-make-interpreted-closure
1   0%                                                     - cconv-fv
1   0%                                                      - cconv-analyze-form
1   0%                                                       - cconv--analyze-function
1   0%                                                          cconv-analyze-form
2   0%                                                - let*
2   0%                                                 - progn
2   0%                                                  - let
1   0%                                                   - while
1   0%                                                    - cond
1   0%                                                     - setq
1   0%                                                        cdr
1   0%                                    - flycheck-report-status
1   0%                                       run-hook-with-args
1   0%                                    - flycheck-syntax-check-new
1   0%                                     - flycheck-compute-working-directory
1   0%                                      - let*
1   0%                                         if
2   0%                                 - flycheck-relevant-errors
2   0%                                  - seq-filter
2   0%                                   - seq-map
2   0%                                    - apply
2   0%                                     - #<compiled 0x184952066ab3d334>
2   0%                                      - mapcar
2   0%                                       - #<compiled 0xb1a3a8086d9f416>
2   0%                                        - flycheck-relevant-error-p
2   0%                                         - if
2   0%                                          - progn
2   0%                                           - save-current-buffer
2   0%                                            - let
2   0%                                             - and
2   0%                                              - or
2   0%                                               - and
1   0%                                                - flycheck-same-files-p
1   0%                                                   or
2   0%                         - lsp--document-highlight
2   0%                          - if
2   0%                           - progn
2   0%                            - let
2   0%                             - if
2   0%                              - lsp-request-async
2   0%                               - let*
2   0%                                - progn
2   0%                                 - lsp--send-request-async
2   0%                                  - let*
2   0%                                   - if
2   0%                                    - let*
1   0%                                       function
1   0%                                     - mapc
1   0%                                      - #<lambda 0x17e48c620aff41ed>
1   0%                                         let*
38   1%                     - real-auto-save-buffers
38   1%                      - save-buffer
38   1%                       - apply
38   1%                        - +format--inhibit-reformat-on-prefix-arg-a
38   1%                         - let
38   1%                          - funcall
38   1%                           - #<subr save-buffer>
38   1%                            - basic-save-buffer
38   1%                             - apply
38   1%                              - polymode-with-current-base-buffer
38   1%                               - #<subr basic-save-buffer>
21   0%                                - run-hook-with-args-until-success
17   0%                                 - undo-tree-save-history-from-hook
17   0%                                  - undo-tree-save-history
17   0%                                   - apply
17   0%                                    - doom-shut-up-a
17   0%                                     - if
17   0%                                      - let
17   0%                                       - prog1
17   0%                                        - apply
16   0%                                         - #<subr undo-tree-save-history>
14   0%                                          - jka-compr-handler
14   0%                                           - jka-compr-write-region
5   0%                                            - jka-compr-call-process
4   0%                                             - #<compiled 0x94ebcc5a4462610>
4   0%                                              - delete-file
4   0%                                               - apply
2   0%                                                - delete-file-projectile-remove-from-cache
2   0%                                                 - projectile-project-root
2   0%                                                  - cl-some
2   0%                                                   - #<compiled -0xdcb5e754f88bb8d>
2   0%                                                    - file-truename
2   0%                                                     - file-truename
2   0%                                                      - file-truename
2   0%                                                       - file-truename
2   0%                                                        - file-truename
2   0%                                                           file-truename
2   0%                                                - #<compiled -0x191f314445e56bc4>
2   0%                                                 - apply
1   0%                                                  - org-roam-db-autosync--delete-file-a
1   0%                                                   - if
1   0%                                                    - and
1   0%                                                     - org-roam-file-p
1   0%                                                      - if
1   0%                                                       - progn
1   0%                                                          let*
1   0%                                               jka-compr-make-temp-name
5   0%                                            - delete-file
5   0%                                             - apply
3   0%                                              - delete-file-projectile-remove-from-cache
2   0%                                               - projectile-project-p
2   0%                                                - projectile-project-root
2   0%                                                 - cl-some
2   0%                                                  - #<compiled -0xdcb5e754f88bb8d>
1   0%                                                   - file-truename
1   0%                                                      file-truename
1   0%                                                   - projectile-root-marked
1   0%                                                    - projectile-root-bottom-up
1   0%                                                     - projectile-locate-dominating-file
1   0%                                                      - #<compiled 0x13918126b9ff4e3e>
1   0%                                                       - cl-some
1   0%                                                          #<compiled 0x13403800b8dd914>
1   0%                                               - projectile-project-root
1   0%                                                - cl-some
1   0%                                                 - #<compiled -0xdcb5e754f88bb8d>
1   0%                                                  - projectile-root-marked
1   0%                                                   - projectile-root-bottom-up
1   0%                                                    - projectile-locate-dominating-file
1   0%                                                     - #<compiled 0x13918126b9ff4e3e>
1   0%                                                      - cl-some
1   0%                                                         #<compiled 0x13403800b8dd914>
2   0%                                              - #<compiled -0x191f314445e56bc4>
2   0%                                               - apply
2   0%                                                - org-roam-db-autosync--delete-file-a
2   0%                                                 - if
2   0%                                                  - and
2   0%                                                   - org-roam-file-p
2   0%                                                    - if
2   0%                                                     - progn
2   0%                                                      - let*
1   0%                                                       - org-roam-descendant-of-p
1   0%                                                        - if
1   0%                                                         - and
1   0%                                                          - equal
1   0%                                                           - file-truename
1   0%                                                              file-truename
1   0%                                              jka-compr-make-temp-name
1   0%                                              jka-compr-run-real-handler
4   0%                                 - TeX-safe-auto-write
4   0%                                  - TeX-auto-write
3   0%                                   - TeX-auto-store
1   0%                                      TeX-auto-parse
1   0%                                    - select-safe-coding-system
1   0%                                       find-auto-coding
1   0%                                     TeX-master-directory
7   0%                                - run-hooks
5   0%                                 - +evil-display-vimlike-save-message-h
3   0%                                  - message
3   0%                                   - if
3   0%                                    - file-relative-name
2   0%                                     - doom-project-root
2   0%                                      - let
2   0%                                       - projectile-project-root
2   0%                                        - cl-some
2   0%                                         - #<compiled -0xdcb5e754f88bb8d>
1   0%                                          - file-truename
1   0%                                           - file-truename
1   0%                                            - file-truename
1   0%                                             - file-truename
1   0%                                              - file-truename
1   0%                                                 file-truename
1   0%                                          - projectile-root-marked
1   0%                                           - projectile-root-bottom-up
1   0%                                            - projectile-locate-dominating-file
1   0%                                             - #<compiled 0x13918126b9ff4e3e>
1   0%                                              - mapcar
1   0%                                                 #<compiled 0x5cc6379dff84163>
1   0%                                     - file-truename
1   0%                                      - file-truename
1   0%                                       - file-truename
1   0%                                        - file-truename
1   0%                                         - file-truename
1   0%                                          - file-truename
1   0%                                             file-truename
1   0%                                 - doom-modeline-update-vcs-icon
1   0%                                  - doom-modeline-vcs-icon
1   0%                                     doom-modeline-icon
1   0%                                 - doom-modeline-update-buffer-file-name
1   0%                                  - doom-modeline-buffer-file-name
1   0%                                     doom-modeline--format-buffer-file-truename
4   0%                                - basic-save-buffer-1
4   0%                                 - basic-save-buffer-2
1   0%                                  - write-region
1   0%                                   - select-safe-coding-system
1   0%                                    - find-coding-systems-region
1   0%                                     - sort-coding-systems
1   0%                                      - #<compiled -0x6aa168b2d51a5ea>
1   0%                                         #<compiled -0x1725ce7d249665de>
4   0%                                - vc-after-save
3   0%                                 - vc-state-refresh
3   0%                                  - vc-call-backend
3   0%                                   - vc-git-state
2   0%                                    - vc-git--run-command-string
2   0%                                     - vc-git--out-ok
2   0%                                      - vc-git--call
2   0%                                         process-file
1   0%                                  vc-before-save
10   0%                     - flyspell-lazy-check-pending
7   0%                      - apply
7   0%                       - flyspell-region
7   0%                        - flyspell-large-region
4   0%                         - flyspell-check-region-doublons
4   0%                            flyspell-word
3   0%                           ispell-call-process-region
4   0%                     - auto-revert-buffers
4   0%                      - auto-revert-buffer
4   0%                         auto-revert-handler
1   0%                     - flycheck--handle-idle-trigger
1   0%                      - let
1   0%                       - if
1   0%                        - progn
1   0%                         - save-current-buffer
1   0%                          - if
1   0%                           - progn
1   0%                            - flycheck-buffer-automatically
1   0%                             - if
1   0%                              - and
1   0%                               - if
1   0%                                - apply
1   0%                                 - flycheck-may-check-automatically
1   0%                                    and
317   9%  - doom-modeline-segment--misc-info
317   9%   - eval
317   9%    - lsp-modeline--diagnostics-update-modeline
317   9%     - let*
317   9%      - setq
317   9%       - cond
317   9%        - let
317   9%         - or
317   9%          - let
317   9%           - funcall
317   9%            - #<lambda 0x3b51900>
317   9%             - let
317   9%              - lsp-modeline-diagnostics-statistics
317   9%               - let
309   9%                - propertize
309   9%                   if
4   0%                - while
4   0%                 - if
4   0%                  - progn
4   0%                   - setq
4   0%                    - nconc
4   0%                     - list
4   0%                        propertize
3   0%                - mapc
3   0%                 - #<lambda 0x19b8e96076936c4>
3   0%                  - mapc
2   0%                   - function
2   0%                    - cconv-make-interpreted-closure
1   0%                     - macroexpand-all
1   0%                      - macroexp--expand-all
1   0%                       - macroexp--all-forms
1   0%                        - macroexp--expand-all
1   0%                         - macroexp--all-forms
1   0%                          - macroexp--expand-all
1   0%                           - macroexp--all-forms
1   0%                            - macroexp--expand-all
1   0%                             - macroexp--all-forms
1   0%                                macroexp--expand-all
1   0%                   - #<lambda 0x19c6acf63875f1a>
1   0%                      let*
1   0%                - cond
1   0%                 - ht-values
1   0%                  - lsp-diagnostics
1   0%                   - or
1   0%                    - let*
1   0%                       function
15   0%  - flycheck--exact-region
15   0%   - let
15   0%    - if
14   0%     - let
14   0%      - if
14   0%       - let
14   0%        - if
12   0%         - progn
12   0%          - let
12   0%           - lsp--cancel-request
12   0%            - mapcar
12   0%             - #<lambda -0x1d77af317db24038>
12   0%              - let
12   0%               - lsp-notify
12   0%                - lsp--send-notification
12   0%                 - mapcar
12   0%                  - #<lambda 0x4a8a52c44f6caa8>
11   0%                   - let
11   0%                    - lsp--send-no-wait
11   0%                     - lsp-process-send
11   0%                      - apply
11   0%                       - #<lambda -0xfb48db7f5271d12>
11   0%                        - progn
11   0%                         - condition-case
1   0%                          - process-send-string
1   0%                           - lsp--make-message
1   0%                              let
2   0%         - let
2   0%          - if
2   0%           - let*
2   0%            - flycheck-line-column-to-position
2   0%             - save-excursion
2   0%              - flycheck-goto-line
2   0%               - let
2   0%                - if
2   0%                   =
1   0%     - lsp-feature?
1   0%      - let
1   0%       - let
1   0%        - if
1   0%         - let
1   0%          - let*
1   0%           - -filter
1   0%            - #<compiled -0x3c81c9ddcc00da7>
1   0%             - apply
1   0%              - lsp--workspace-method-supported?
1   0%               - let
1   0%                - if
1   0%                 - or
1   0%                  - if
1   0%                     progn
13   0%  - flycheck-report-buffer-checker-status
13   0%   - let
13   0%    - if
13   0%     - progn
13   0%      - save-current-buffer
11   0%       - let
11   0%        - cond
11   0%         - let
11   0%          - if
11   0%           - progn
11   0%            - flycheck-finish-current-syntax-check
11   0%             - let*
9   0%              - if
8   0%               - flycheck-report-current-errors
8   0%                - seq-do
7   0%                 - mapc
7   0%                  - #<lambda 0x399479f242cf2>
7   0%                   - run-hook-with-args-until-success
7   0%                    - flycheck-add-overlay
7   0%                     - let*
7   0%                      - progn
7   0%                       - let*
7   0%                        - let
7   0%                         - let*
6   0%                          - progn
6   0%                           - flycheck--setup-highlighting
6   0%                            - let
5   0%                             - let*
5   0%                              - function
3   0%                               - cconv-make-interpreted-closure
2   0%                                - macroexpand-all
2   0%                                 - macroexp--expand-all
1   0%                                  - macroexp--expand-all
1   0%                                   - macroexp--compiler-macro
1   0%                                    - apply
1   0%                                     - cl--block-wrapper--cmacro
1   0%                                      - macroexpand-all
1   0%                                       - macroexp--expand-all
1   0%                                        - macroexp--all-forms
1   0%                                         - macroexp--expand-all
1   0%                                          - macroexp--all-forms
1   0%                                           - macroexp--expand-all
1   0%                                            - macroexp--compiler-macro
1   0%                                             - apply
1   0%                                              - lsp--workspace-p--cmacro
1   0%                                               - cl-block
1   0%                                                  #<compiled 0x28b2187652a5ce5>
1   0%                                  - macroexp--all-forms
1   0%                                   - macroexp--expand-all
1   0%                                      macroexp--all-clauses
1   0%                                - cconv-fv
1   0%                                 - cconv-analyze-form
1   0%                                  - cconv--analyze-function
1   0%                                   - cconv-analyze-form
1   0%                                    - cconv-analyze-form
1   0%                                     - cconv-analyze-form
1   0%                                      - cconv--analyze-function
1   0%                                       - cconv-analyze-form
1   0%                                        - cconv-analyze-form
1   0%                                         - cconv--analyze-function
1   0%                                          - cconv-analyze-form
1   0%                                           - cconv-analyze-form
1   0%                                              cconv-analyze-form
1   0%                             - if
1   0%                              - progn
1   0%                               - let*
1   0%                                - overlay-put
1   0%                                 - flycheck-error-level-make-indicator
1   0%                                  - propertize
1   0%                                   - cond
1   0%                                    - let
1   0%                                       list
1   0%                 - seq-sort
1   0%                  - function
1   0%                   - cconv-make-interpreted-closure
1   0%                    - macroexpand-all
1   0%                     - macroexp--expand-all
1   0%                      - macroexp--all-forms
1   0%                       - macroexp--expand-all
1   0%                        - macroexp--all-forms
1   0%                         - macroexp--expand-all
1   0%                          - macroexp--all-forms
1   0%                             macroexp--expand-all
1   0%               - flycheck-disable-excessive-checker
1   0%                - if
1   0%                 - and
1   0%                    >
2   0%              - let
2   0%               - if
2   0%                - flycheck-report-status
2   0%                 - run-hook-with-args
1   0%                  - doom-modeline-update-flycheck-text
1   0%                   - doom-modeline--flycheck-count-errors
1   0%                    - flycheck-count-errors
1   0%                     - let
1   0%                      - let
1   0%                       - while
1   0%                        - let
1   0%                           setq
2   0%       - apply
2   0%        - #<lambda 0x324978759a57efe>
2   0%         - let*
2   0%          - funcall
2   0%           - #<compiled -0x15fc5be8dec6d722>
2   0%            - #<compiled 0x99b9125d1aecfb2>
2   0%             - run-hook-with-args
2   0%              - eldoc-display-in-buffer
2   0%               - eldoc--format-doc-buffer
2   0%                - special-mode
1   0%                 - use-local-map
1   0%                  - apply
1   0%                   - ad-Advice-use-local-map
1   0%                    - evil-normalize-keymaps
1   0%                     - evil-state-keymaps
1   0%                      - evil-state-keymaps
1   0%                       - evil-state-auxiliary-keymaps
1   0%                          evil-mode-for-keymap
1   0%                 - run-mode-hooks
1   0%                  - run-hooks
1   0%                   - solaire-global-mode-enable-in-buffers
1   0%                    - turn-on-solaire-mode
1   0%                       solaire-mode
1   0%  - #<lambda 0x19b0cc206d6dea19>
1   0%   - let*
1   0%    - cond
1   0%     - let
1   0%      - let
1   0%       - lsp-notify
1   0%        - lsp--send-notification
1   0%         - mapcar
1   0%          - #<lambda 0x8fb3c9e33bd4db0>
1   0%           - let
1   0%            - lsp--send-no-wait
1   0%             - lsp-process-send
1   0%              - apply
1   0%               - #<lambda -0xfb48db7f5271d12>
1   0%                - progn
1   0%                   condition-case
1   0%  - #<lambda 0x19b0cc206d6d3959>
1   0%   - let*
1   0%    - cond
1   0%     - let
1   0%      - let
1   0%       - lsp-notify
1   0%        - lsp--send-notification
1   0%         - mapcar
1   0%          - #<lambda 0x8fb3c9e33bd4db0>
1   0%           - let
1   0%            - lsp--send-no-wait
1   0%             - lsp-process-send
1   0%              - apply
1   0%               - #<lambda -0xfb48db7f5271d12>
1   0%                - progn
1   0%                   condition-case
267   7% + redisplay_internal (C function)
93   2% + #<lambda -0x69e06cf31916cd5>
53   1% + command-execute
20   0% + timer-event-handler
13   0% + company-post-command
1   0% + yas--post-command-handler
1   0% + preview-move-point
1   0% + help-command-error-confusable-suggestions