commit | 56ebcc1d297f112cb7a66d9ef8c7c06839daf6e5 | [log] [tgz] |
---|---|---|
author | Jacob MacDonald <jakemac@google.com> | Tue Feb 11 07:12:22 2025 -0800 |
committer | GitHub <noreply@github.com> | Tue Feb 11 07:12:22 2025 -0800 |
tree | 15264bb7a2152a4fb5eccc1b5676cfd8bedaaa73 | |
parent | bda9a0ed026f8934eafc88348f9cda87ceaaa7ae [diff] |
make ancestorIds an iterable, avoids n^2 allocations for sets (#8878) Part of https://github.com/flutter/devtools/issues/7917 Previously, calling this getter would cause n^2 allocations since it would recursively call the same getter, making `_LinkedHashSetMixin._add` the largest contributor on CPU profiles (763ms, ~14%) when loading a large sample. This is actually only ever used once, where it is iterated, so it doesn't need to be a set at all and can instead just be a lazy iterable. This should also come with some memory savings but I haven't evaluated that.
Dart & Flutter DevTools is a suite of performance tools for Dart and Flutter.
For documentation on installing and trying out DevTools, please see our docs.
Contributions welcome! See our contributing page for an overview of how to build and contribute to the project.
By using Dart DevTools, you agree to the Google Terms of Service. To understand how we use data collected from this service, see the Google Privacy Policy.