AngularTransformerGroup memory leak #1683
Description
Since the upgrade to AngularDart 1.0 we have been experiencing some severe issues with our project build. We needed to allocate about 20 GB heap space for pub and one single build takes about 1h 30m. To simulate a large scale project, i changed the sample application in this branch https://github.com/heisaf/angular.dart/tree/todo_generator. The TodoGenerator is a transformer that copies the Todo App as many times as you want (defaults to 20). You can config the number of Todo Apps by setting the generate property in the pubspec.yaml.
transformers:
- angular_dart_example:
generate: '5'
To run pub build successfully with 20 Todo Apps, you need to set the heap space to 4GB. If you increase the Todo Apps you also need to increase the heap space (until you run out of physical memory). Otherwise pub build stops with "Exhausted heap space" messages. The size of the allocated heap space should not depend on the number of views that need to be compiled to javascipt.