Open DartBot opened 9 years ago
Comment by blois
Update- actual dirty-check time appears to be ~.5s- I was including the re-resolving time in there as well.
Comment by munificent
Issue dart-lang/pub#960 has been merged into this issue.
cc @blois. cc @bwilkerson.
Issue by blois Originally opened as dart-lang/sdk#16817
When maintaining a resolved AST it's important to know what assets changed since the code was last processed in order to do incremental updates.
Currently in order to get this change list the resolving code walks every referenced Dart file, requests the contents then checks if that string has changed.
We can share the resolved AST between multiple transformers for the same package, but when one AST is doing code-gen that feeds into the next the resolver needs to update changed assets for each step. I can have some back-channel communication notify the changed assets, but naive approach of just re-calculating changes adds a bit of overhead.
For the Angular Todo application (2 user-code files + Angular) this appears to take about 2.5s to do a naive 'dirty check' on all assets. Doing this for each transformer which needs a resolved AST from the previous transformer takes ~10s of the total 30s compilation time. (For comparison, dart2js from the console takes ~13s).