35492bdf14
During each phase we are caching the bytes for files we read. We end up holding onto them longer than we would otherwise need to. The only time this cache is actually used is to report messages from the CFE. In those infrequent cases we can easily re-read the necessary file. In the CFE and closed world phases this saves >300MB because the source file bytes can be released. In codegen and global inference the savings are more modest (<10MB). The emitter phases does not benefit from this because it's holding onto the input file to do deferred reading. Change-Id: I980c81178ed250646d446521059460d8277fe3f6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292040 Reviewed-by: Sigmund Cherem <sigmund@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>