LoginSignup
0
0

現象

Javascript(Typescript)での開発時、Intelisenceが異常に重い時があった。具体的には、変数の変更時などにtypeのチェックに数十秒の時間がかかっていた。

何かおかしいなと思っていた最中、Visual Studio Code is unable to watch for file changes in this large workspaceというエラーが出た。

解決方法

Visual Studio Code is unable to watch for file changes in this large workspaceに書かれている通り、以下のようにsettings.jsonを変更した。

{
    "files.watcherExclude": {
        "**/.git/objects/**": true,
        "**/.git/subtree-cache/**": true,
        "**/node_modules/*/**": true
      }
}

すると、Intelisenceが不満ないスピードで動くようになった。

考察

開発途中で様々なdependenciesを追加したことにより、node_modulesに大量のファイルが追加され、それをVS Codeが読みにいったせいで重くなったのだと思われる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0