Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid logging information by-default and never discarding such logs
The analyzer wraps various functionality in logging calls like await logger.runAsync('Prepare linked bundles', () async { ... }); Doing so will cause time being measured and begin/end messages to be written to a log. Those strings accumulate in a `StringBuffer` that is never accessed. For example running analyzer on a big app like flutter can cause thousands of "--- Prepare linked bundles in 0 ms. " strings to be generated and hanged on to. This CL makes us no longer generate such strings - only if the creator of a context supplies a [PerformanceLog] explicitly (in which case it is responsible for draining the messages written to it). This reduces memory consumption when analyzing flutter by around 3 MB. TEST=ci Change-Id: I4979a964f13c63bd2a3cccef97fb702431731139 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254925 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
- Loading branch information