1. 21 Jun, 2023 1 commit
    • Yegor's avatar
      [framework,web] add FlutterTimeline and semantics benchmarks that use it (#128366) · 07772a3d
      Yegor authored
      ## FlutterTimeline
      
      Add a new class `FlutterTimeline` that's a drop-in replacement for `Timeline` from `dart:developer`. In addition to forwarding invocations of `startSync`, `finishSync`, `timeSync`, and `instantSync` to `dart:developer`, provides the following extra methods that make is easy to collect timings for code blocks on a frame-by-frame basis:
      
      * `debugCollect()` - aggregates timings since the last reset, or since the app launched.
      * `debugReset()` - forgets all data collected since the previous reset, or since the app launched. This allows clearing data from previous frames so timings can be attributed to the current frame.
      * `now` - this was enhanced so that it works on the web by calling `window.performance.now` (in `Timeline` this is a noop in Dart web compilers).
      * `collectionEnabled` - a field that controls whether `FlutterTimeline` stores timings in memory. By default this is disabled to avoid unexpected overhead (although the class is designed for minimal and predictable overhead). Specific benchmarks can enable collection to report to Skia Perf.
      
      ## Semantics benchmarks
      
      Add `BenchMaterial3Semantics` that benchmarks the cost of semantics when constructing a screen full of Material 3 widgets from nothing. It is expected that semantics will have non-trivial cost in this case, but we should strive to keep it much lower than the rendering cost. This is the case already. This benchmark shows that the cost of semantics is <10%.
      
      Add `BenchMaterial3ScrollSemantics` that benchmarks the cost of scrolling a previously constructed screen full of Material 3 widgets. The expectation should be that semantics will have trivial cost, since we're just shifting some widgets around. As of today, the numbers are not great, with semantics taking >50% of frame time, which is what prompted this PR in the first place. As we optimize this, we want to see this number improve.
      07772a3d
  2. 27 Mar, 2023 1 commit
  3. 17 Feb, 2023 1 commit
  4. 02 Feb, 2023 2 commits
    • Michael Goderbauer's avatar
      Make Flex,Row,Column const for real (#119673) · b0f1714b
      Michael Goderbauer authored
      * Make Flex,Row,Column const for real
      
      * dart fix --apply
      
      * fix snippets
      
      * fix integration test
      
      * add comment
      b0f1714b
    • Andrew Kolos's avatar
      Reland "Add API for discovering assets" (#119277) · fd76ef0f
      Andrew Kolos authored
      * add asset manifest bin loading and asset manifest api
      
      * use new api for image resolution
      
      * remove upfront smc data casting
      
      * fix typecasting issue
      
      * remove unused import
      
      * fix tests
      
      * lints
      
      * lints
      
      * fix import
      
      * revert image resolution changes
      
      * Update image_resolution_test.dart
      
      * Update decode_and_parse_asset_manifest.dart
      
      * make targetDevicePixelRatio optional
      
      * Update packages/flutter/lib/src/services/asset_manifest.dart
      Co-authored-by: 's avatarJonah Williams <jonahwilliams@google.com>
      
      * Update packages/flutter/lib/src/services/asset_manifest.dart
      Co-authored-by: 's avatarJonah Williams <jonahwilliams@google.com>
      
      * fix immutable not being imported
      
      * return List in AssetManifest methods, fix annotation import
      
      * simplify onError callback
      
      * make AssetManifest methods abstract instead of throwing UnimplementedError
      
      * simplify AssetVariant.key docstring
      
      * tweak _AssetManifestBin docstring
      
      * make AssetManifest and AssetVariant doc strings more specific
      
      * use List.of instead of List.from for type-safety
      
      * adjust import
      
      * change _AssetManifestBin comment from doc comment to normal comment
      
      * revert to callback function for onError in loadStructuredBinaryData
      
      * add more to the docstring of AssetManifest.listAssets and AssetVariant.key
      
      * add tests for CachingAssetBundle caching behavior
      
      * add simple test to ensure loadStructuredBinaryData correctly calls load
      
      * Update asset_manifest.dart
      
      * update docstring for AssetManifest.getAssetVariants
      
      * rename getAssetVariants, have it include main asset
      
      * rename isMainAsset field of AssetMetadata to main
      
      * (slightly) shorten name of describeAssetAndVariants
      
      * rename describeAssetVariants back to getAssetVariants
      
      * add tests for TestAssetBundle
      
      * nits
      
      * fix typo in docstring
      
      * remove no longer necessary non-null asserts
      
      * update gallery and google_fonts versions
      
      ---------
      Co-authored-by: 's avatarJonah Williams <jonahwilliams@google.com>
      fd76ef0f
  5. 26 Jan, 2023 2 commits
    • Christopher Fujino's avatar
      Revert "Add API for discovering assets (#118410)" (#119273) · a04ab712
      Christopher Fujino authored
      This reverts commit 2b8f2d05.
      a04ab712
    • Andrew Kolos's avatar
      Add API for discovering assets (#118410) · 2b8f2d05
      Andrew Kolos authored
      * add asset manifest bin loading and asset manifest api
      
      * use new api for image resolution
      
      * remove upfront smc data casting
      
      * fix typecasting issue
      
      * remove unused import
      
      * fix tests
      
      * lints
      
      * lints
      
      * fix import
      
      * revert image resolution changes
      
      * Update image_resolution_test.dart
      
      * Update decode_and_parse_asset_manifest.dart
      
      * make targetDevicePixelRatio optional
      
      * Update packages/flutter/lib/src/services/asset_manifest.dart
      Co-authored-by: 's avatarJonah Williams <jonahwilliams@google.com>
      
      * Update packages/flutter/lib/src/services/asset_manifest.dart
      Co-authored-by: 's avatarJonah Williams <jonahwilliams@google.com>
      
      * fix immutable not being imported
      
      * return List in AssetManifest methods, fix annotation import
      
      * simplify onError callback
      
      * make AssetManifest methods abstract instead of throwing UnimplementedError
      
      * simplify AssetVariant.key docstring
      
      * tweak _AssetManifestBin docstring
      
      * make AssetManifest and AssetVariant doc strings more specific
      
      * use List.of instead of List.from for type-safety
      
      * adjust import
      
      * change _AssetManifestBin comment from doc comment to normal comment
      
      * revert to callback function for onError in loadStructuredBinaryData
      
      * add more to the docstring of AssetManifest.listAssets and AssetVariant.key
      
      * add tests for CachingAssetBundle caching behavior
      
      * add simple test to ensure loadStructuredBinaryData correctly calls load
      
      * Update asset_manifest.dart
      
      * update docstring for AssetManifest.getAssetVariants
      
      * rename getAssetVariants, have it include main asset
      
      * rename isMainAsset field of AssetMetadata to main
      
      * (slightly) shorten name of describeAssetAndVariants
      
      * rename describeAssetVariants back to getAssetVariants
      
      * add tests for TestAssetBundle
      
      * nits
      
      * fix typo in docstring
      
      * remove no longer necessary non-null asserts
      Co-authored-by: 's avatarJonah Williams <jonahwilliams@google.com>
      2b8f2d05
  6. 07 Dec, 2022 1 commit
  7. 05 Dec, 2022 1 commit
  8. 07 Oct, 2022 1 commit
  9. 27 Sep, 2022 1 commit
  10. 02 Sep, 2022 1 commit
  11. 28 Jul, 2022 1 commit
  12. 16 Jun, 2022 1 commit
  13. 18 May, 2022 1 commit
  14. 11 May, 2022 1 commit
  15. 27 Apr, 2022 1 commit
  16. 20 Apr, 2022 1 commit
  17. 13 Apr, 2022 1 commit
  18. 12 Apr, 2022 1 commit
  19. 22 Feb, 2022 1 commit
  20. 03 Feb, 2022 1 commit
  21. 08 Oct, 2021 3 commits
  22. 15 Jul, 2021 1 commit
  23. 14 Jul, 2021 3 commits
  24. 13 Jul, 2021 2 commits
  25. 02 Jun, 2021 1 commit
  26. 24 Apr, 2021 1 commit
  27. 02 Apr, 2021 1 commit
  28. 18 Mar, 2021 1 commit
  29. 21 Jan, 2021 1 commit
  30. 20 Jan, 2021 1 commit
  31. 20 Nov, 2020 1 commit
  32. 15 Oct, 2020 2 commits