After the dist folder is generated every time i open the editor it grinds the CPU on 100% even when no other process runs just the IDE.
It can be something associated with the project because i haven't experienced it on other Typescript based Angular 2 projects like angular2-webpack.
Not sure if it's exactly the same, but I use WebStorm, and to solve this issue I configure it to exclude the _dist_ and _tmp_ folders from indexing (right-click on a folder in the Project tree, Mark Directory As > Excluded). WebStorm remembers that the folders are excluded even if they are deleted and generated again.
I ended up switching from MacOSx to Ubuntu because of this issue, it was taking me up to 45 seconds to compile every time I made a change where as now in ubuntu it takes around 300ms, try ignoring node_modules folder also in Settings -> Editor -> File Types at the bottom it says ignore files and folders enter in node_modules and any other big folders that you don't need this way it will stop them from being indexed and potentially saving your computers some resources.
It's likely associated with how the CLI re-generates a lot of files. There isn't much that can be done on the CLI except completely changing it's architecture.
The suggestions given by @mikejpeters and @RicardoVaranda sound good but I can't test them myself since I do not use webstorm.
I'm closing the issue since there isn't much that we can do, it's an editor specific thing, and there seem to be some solutions suggested already.
Editor specific? Every editor that indexes files inside the project suffers from it. Except for ones that doesn't do it.
I thought the intention of this repository is to help easily scaffold and develop Angular 2 projects and it is a turndown for those using IDEs.
I would revalidate the copy everything nature of the architecture. As i experienced it copies node_modules files also, Those can be served from their original location for development.
I have just discovered that if you exclude the tmp directory instead of the node_modules (which is required to have auto completion in Webstorm/phpStorm) it dramatically improves the performance of the application. Try it and let me know :)
This is a consequence of broccoli, used under the hood. Broccoli is conceptually great, but it does some different things compared to other tools, you end up with potentially many copies (or ideally symlinks) of your files created and changed as changes occur, in a tmp directory. This puts a surprisingly large burden on any tool configured to watch your entire project directory. You must exclude tmp to get reasonable results. Until we can persuade all editor makers to exclude these files by default, I believe it is wise to prominently mention this in the README of any project that uses broccoli. (And this is not a criticism, I am a big fan of broccoli!)
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Not sure if it's exactly the same, but I use WebStorm, and to solve this issue I configure it to exclude the _dist_ and _tmp_ folders from indexing (right-click on a folder in the Project tree, Mark Directory As > Excluded). WebStorm remembers that the folders are excluded even if they are deleted and generated again.