emacs-lsp / lsp-pyright

lsp-mode :heart: pyright
https://emacs-lsp.github.io/lsp-pyright
GNU General Public License v3.0
284 stars 24 forks source link

emacs hang after enable pyright #57

Closed wztdream closed 3 years ago

wztdream commented 3 years ago

I just switched to lsp-pyright using spacemacs develop branch, but emacs will hang there if open an python file. below is the result of profile-report, it seems to me this is related with lsp--all-watchable-directories, any idea where is wrong?

- #<compiled 0x15952ca777e1>                              310,227,249  78%
 - lsp--parser-on-message                                 310,175,050  78%
  - lsp--on-request                                       308,480,245  77%
   - mapc                                                 308,480,001  77%
    - lsp--server-register-capability                     308,410,830  77%
     - lsp-watch-root-folder                              308,214,112  77%
      - lsp--all-watchable-directories                    307,914,305  77%
       - -map                                             306,885,645  77%
        - mapcar                                          306,885,645  77%
         - #<compiled 0x15952ca916b5>                     306,885,645  77%
          - lsp--all-watchable-directories                306,884,597  77%
           - -map                                         303,637,919  76%
            - mapcar                                      303,637,919  76%
             - #<compiled 0x15952cc12e31>                 303,637,919  76%
              - lsp--all-watchable-directories            303,613,035  76%
               - -map                                     201,231,987  50%
                - mapcar                                  201,231,987  50%
                 - #<compiled 0x15952cc12ee5>             201,231,987  50%
                  - lsp--all-watchable-directories        201,211,307  50%
                   - -map                                 195,664,223  49%
                    - mapcar                              195,661,055  49%
                     - #<compiled 0x15952cc12ee5>         195,661,055  49%
                      + lsp--all-watchable-directories    195,661,055  49%
                     f-symlink?                               380,334   0%

I solved this issue by remove some 3rd part library root from workspace by command treemacs-edit-workspaces, maybe it is due to these library all too large.

wztdream commented 3 years ago

solved by remove 3rd library from workspace