{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3412","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3412/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3412/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3412/events","html_url":"https://github.com/Microsoft/TypeScript/issues/3412","id":86079740,"number":3412,"title":"Visual Studio editor : CPU at 100% and memory leaks","user":{"login":"jcchalte","id":4697707,"avatar_url":"https://avatars.githubusercontent.com/u/4697707?v=3","gravatar_id":"","url":"https://api.github.com/users/jcchalte","html_url":"https://github.com/jcchalte","followers_url":"https://api.github.com/users/jcchalte/followers","following_url":"https://api.github.com/users/jcchalte/following{/other_user}","gists_url":"https://api.github.com/users/jcchalte/gists{/gist_id}","starred_url":"https://api.github.com/users/jcchalte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcchalte/subscriptions","organizations_url":"https://api.github.com/users/jcchalte/orgs","repos_url":"https://api.github.com/users/jcchalte/repos","events_url":"https://api.github.com/users/jcchalte/events{/privacy}","received_events_url":"https://api.github.com/users/jcchalte/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/High%20Priority","name":"High Priority","color":"e11d21"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20More%20Info","name":"Needs More Info","color":"556b75"}],"state":"open","locked":false,"assignee":{"login":"vladima","id":8052307,"avatar_url":"https://avatars.githubusercontent.com/u/8052307?v=3","gravatar_id":"","url":"https://api.github.com/users/vladima","html_url":"https://github.com/vladima","followers_url":"https://api.github.com/users/vladima/followers","following_url":"https://api.github.com/users/vladima/following{/other_user}","gists_url":"https://api.github.com/users/vladima/gists{/gist_id}","starred_url":"https://api.github.com/users/vladima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladima/subscriptions","organizations_url":"https://api.github.com/users/vladima/orgs","repos_url":"https://api.github.com/users/vladima/repos","events_url":"https://api.github.com/users/vladima/events{/privacy}","received_events_url":"https://api.github.com/users/vladima/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/10","html_url":"https://github.com/Microsoft/TypeScript/milestones/TypeScript%201.5.2","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/10/labels","id":1081230,"number":10,"title":"TypeScript 1.5.2","description":"","creator":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":53,"state":"open","created_at":"2015-04-23T20:46:41Z","updated_at":"2015-06-10T17:29:37Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-06-08T08:22:41Z","updated_at":"2015-06-11T15:34:08Z","closed_at":null,"body":"Hello,\r\n\r\nI am currently working on a project that uses Typescript on the client side. We have currently around 280k lines of typescript code in our VS2013  ASP.net MVC project.\r\n\r\nThe issue we have is that if we work with typescript, after around 2 hours of work, DevEnv starts to freeze for seconds, to throws OutOfMemoryException, and ultimately crashes, with a DevEnv.exe process using around 2 GB of RAM.\r\n\r\nI have tried to figure out what is going wrong and have disabled all extensions (including Resharper), except for Typescript 1.4. I added an empty typescript file to the project. As soon as I open it, the CPU usage of devenv increase to 25% (on my quadcore i7 3770) for around 20 seconds. The memory usage increase drastically, then goes down at the end. It does the exact same behaviour when I add any new character to any ts file (even blank ones), when I open a TS file, when I close one etc. It seems that the Typescript starts a totally new compilation each time of the whole project even if no modification has been done, or even if the modification cannot have any impact on the rest of the project.\r\n\r\nUsually, it goes down to a few dozens of MB more than the previous memory usage before the CPU spike. Sometime it goes a little bit below but the trend is always in towards an increase in memory usage up to the point where the DevEnv process reaches 2 GB and crashes. As an example, if I open Visual Studio, open a new blank TS file, wait for the first CPU spike to calm down, the RAM usage is around 730 MB. If I modify this file, then wait for the subsequent CPU spike to finish and do that 6 times, the RAM usage has gone up to 1.1 GB of RAM. If I do that again 5 times, the CPU usage is now at 1.26 GB and so on.\r\n\r\nBetween the memory leaks and the DevEnv constantly at 100% CPU, Typescript development has become a pain. Some of the team members have started to uninstall Typescript editor and only relies on Resharper for intellisense and error reporting in TS files.\r\n\r\nSo here are my questions :\r\n-  Is there any way we could disable the automatic \"compilation\" ? we don't need it here as we use an external script to compile the whole Typescript part and reports errors.\r\n- Will this behaviour corrected in the subsequent Typescript releases ? TS 1.5 Beta does not seems to adress this.\r\n- Is there any way we could decrease the issue ?\r\n\r\nHave a nice day,\r\nJean-Christophe Chalté"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/111175030","html_url":"https://github.com/Microsoft/TypeScript/issues/3412#issuecomment-111175030","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3412","id":111175030,"user":{"login":"vladima","id":8052307,"avatar_url":"https://avatars.githubusercontent.com/u/8052307?v=3","gravatar_id":"","url":"https://api.github.com/users/vladima","html_url":"https://github.com/vladima","followers_url":"https://api.github.com/users/vladima/followers","following_url":"https://api.github.com/users/vladima/following{/other_user}","gists_url":"https://api.github.com/users/vladima/gists{/gist_id}","starred_url":"https://api.github.com/users/vladima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladima/subscriptions","organizations_url":"https://api.github.com/users/vladima/orgs","repos_url":"https://api.github.com/users/vladima/repos","events_url":"https://api.github.com/users/vladima/events{/privacy}","received_events_url":"https://api.github.com/users/vladima/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T15:34:08Z","updated_at":"2015-06-11T15:34:08Z","body":"@jcchalte apologies, ignore the last comment, somehow I've missed that you already on TS 1.5 beta. Keep using it, just try to disable ReSharper. "}}