Commit Graph

5 Commits

Author SHA1 Message Date
Konstantin Shcheglov f4080e7ae3 Heap. Drop XyzLinkedData after reading.
All results
--------------------------------
flutter_elements
  reachableObjects
    count: 11774300
      change: -7.92% -1012105
    size: 951741119 = 929434 KB = 907.7 MB
      change: -4.48% -44650680 = -43604 KB = -42.6 MB
  _SimpleUri
    count: 3112
    size(shallow): 248960 = 243 KB
    duplicateCount: 0
  InterfaceTypeImpl
    count: 157899
      change: -0.01% -16
    size(shallow): 10105536 = 9868 KB = 9.6 MB
      change: -0.01% -1024 = -1 KB
  LinkedData
    count: 0
Change-Id: If98590f84d050c7c03d2a5e81d2e23353e7c02ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-10-16 20:51:02 +00:00
Konstantin Shcheglov c8f8ae8afd Heap. Add --write-file option, print changes relative to the results in the file.
Output example:

All results
--------------------------------
flutter_elements
  reachableObjects
    count: 3487130
      change: -1.19% -41855
    size: 335892119 = 328019 KB = 320.3 MB
      change: -0.58% -1949720 = -1904 KB = -1.9 MB
  _SimpleUri
    count: 3061
    size(shallow): 244880 = 239 KB
    duplicateCount: 0
  InterfaceTypeImpl
    count: 40821
    size(shallow): 2612544 = 2551 KB = 2.5 MB

Change-Id: I371ac4f6c1bf4d70238b47fc9f28bbc3f07abcf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330244
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-13 01:22:29 +00:00
Konstantin Shcheglov c63d228ad6 Heap. Measure InterfaceTypeImpl instances.
The optimization was already done previously.

Before:
--------------------------------
flutter_elements
  reachableObjects
    count: 14531246
    size: 1107667559 = 1081706 KB = 1056.4 MB = 1.03 GB
  _SimpleUri
    count: 3112
    size(shallow): 248960 = 243 KB
    duplicateCount: 0
  InterfaceTypeImpl
    count: 1904467
    size(shallow): 121885888 = 119029 KB = 116.2 MB


After:
--------------------------------
flutter_elements
  reachableObjects
    count: 12839510
    size: 999428703 = 976004 KB = 953.1 MB
  _SimpleUri
    count: 3112
    size(shallow): 248960 = 243 KB
    duplicateCount: 0
  InterfaceTypeImpl
    count: 211922
    size(shallow): 13563008 = 13245 KB = 12.9 MB
Change-Id: Ibcfa0b4c1c61cb074764fb9ed1884086064d24e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-12 19:09:21 +00:00
Martin Kustermann a5ba26babb Make [ByteData] of [Uint8List] based on the same bytes
A [Uint8List] may be a view into a larger buffer. When we want to create
a corresponding [ByteData], we should ensure the byte data is based on
the same bytes (and not e.g. include additional heading/trailing bytes)
by using `bytes.buffer.asByteData(bytes.offsetInBytes, bytes.length)`

Change-Id: Ifd7b59a41b8ee0431319d5cf13a2e63da3dfb00e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-10-11 14:26:48 +00:00
Konstantin Shcheglov b7d3c47d13 Adds benchmark measuring memory consumption of live objects after analyzing flutter.
Will warm up the memory cache and then measure how much live memory the analyzer consumes after visiting all elements with the warmed up cache.

All results
--------------------------------
flutter_elements
  reachableObjects
    count: 9071480
    size: 799672175 = 780929 KB = 762 MB
  _SimpleUri
    count: 3112
    size(shallow): 248960 = 243 KB
    duplicateCount: 0

Change-Id: I75209f88f6f615172127cd439afe9d0cd83b1c4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329682
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-10-10 17:54:08 +00:00