title: Intellij constantly compiles TypeScript (very slow) - How to stop this behavior?
body: <p>I am in the process of migrating an Angular 1.x project from vanilla JS to TypeScript. However, I am experiencing extremely slow response times from my IDE.<a href="https://i.stack.imgur.com/LkiDj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LkiDj.png" alt="Constant compiling of many files"></a></p>
  
  <p>If I uncheck "Track changes" in Settings > Languages &amp; Frameworks > TypeScript, the compilation stops--but I am then in a position where my TS doesn't compile!</p>
  
  <p>Of course, I could configure a gulp file and set a watcher that recompiles files on change. But, if possible, I would like to avoid the need to run gulp for each project. Also, <em>more importantly</em>, unchecking "Track changes" removes TS specific advice AND appears to break some references.</p>
  
  <p>Track changes: Checked - <em>Help + references</em>
  <a href="https://i.stack.imgur.com/nEwex.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nEwex.png" alt="Help + References"></a></p>
  
  <p>Track changes: Unchecked - <em>No help + References broken</em>
  <a href="https://i.stack.imgur.com/bQby5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bQby5.png" alt="No help + References broken"></a></p>
  
  <p>Question #1:</p>
  
  <p><strong>Is it possible to configure Intellij such that it only compiles changed files?</strong></p>
  
  <p>Question #2:</p>
  
  <p><strong>Why is Intellij compiling <em>so many</em> files?</strong>
  Here is a copy of my tsconfig.json:</p>
  
  <pre><code>{
    "compilerOptions": {
      "module": "system",
      "noImplicitAny": false,
      "removeComments": true,
      "preserveConstEnums": true,
      "outFile": "build/local/tsc.js",
      "sourceMap": true,
      "typeRoots": [
        "./node_modules/@types",
        "./typings"
      ],
      "moduleResolution": "node"
    },
  
    "exclude": [
      "client/src/node_modules",
      "**/*.spec.ts",
      "src/bower_components",
      "client/src/bower_components",
      "client/src/node_modules",
      "build",
      "Saved_HTML",
      "site-ideas",
      "node_modules",
      "client/typings"
    ]
  }
  </code></pre>
  
  <p>Note that despite setting node_modules as an ignored directory, the compiler is still reaching in there. <a href="https://i.stack.imgur.com/6RSuO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6RSuO.png" alt="enter image description here"></a>.</p>