- 19 Sep, 2023 1 commit
-
-
Greg Spencer authored
## Description This removes all of the comments that are of the form "so-and-so must not be null" or "so-and-so must be non-null" from the cases where those values are defines as non-nullable values. This PR removes them from the library in the repo that don't have anything to do with the framework. This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some. In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow. This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases. I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these). ## Related PRs - https://github.com/flutter/flutter/pull/134984 - https://github.com/flutter/flutter/pull/134991 - https://github.com/flutter/flutter/pull/134992 - https://github.com/flutter/flutter/pull/134993 ## Tests - Documentation only change.
-
- 31 Aug, 2023 1 commit
-
-
Jim Graham authored
This benchmark will track the performance of the RTree implementation to cull very large pictures down to just the portion visible on the screen.
-
- 24 Aug, 2023 1 commit
-
-
Yegor authored
Add benchmarks that measure the overhead of the benchmark harness itself. We want the overhead to be minimal. Also, these numbers are useful to judge the quality of real benchmarks. If a real benchmark's result is too close to the harness overhead, then it's likely not measuring enough of useful work.
-
- 23 Aug, 2023 1 commit
-
-
Mouad Debbar authored
This became unnecessary since https://github.com/flutter/flutter/pull/132087
-
- 14 Aug, 2023 1 commit
-
-
Jonah Williams authored
This is causing the benchmark to not render with Skia. We probably need to CHECK this somewhere in the backend..
-
- 09 Aug, 2023 1 commit
-
-
gaaclarke authored
issue: https://github.com/flutter/flutter/issues/131784 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
-
- 08 Aug, 2023 2 commits
-
-
Jonah Williams authored
Adds impeller benchmarks to track the progress of improvements made in https://github.com/flutter/flutter/issues/131345
- 07 Aug, 2023 1 commit
-
-
Matej Knopp authored
This adds a macrobenchmark representative of a real world application that uses SVG icons. The scenario of rasterizing complex paths that don't change over time does not seem to be covered by any other macrobenchmark and shows a significantly slower impeller performance compared to skia. It's actually bit problematic to measure this because on A15 the CPU load with impeller is high enough to trigger CPU frequency change. So in order to get consistent reading I had to add a spinning background thread that would keep the CPU at highest frequency. ```objc [NSThread detachNewThreadWithBlock:^{ while (true) { pthread_yield_np(); } }]; ``` ```bash flutter drive --profile --local-engine=ios_profile -t test_driver/run_app.dart --driver test_driver/path_tessellation_static_perf_test.dart ``` | average_frame_build_time_millis |Time| |--|--| | Impeller | 0.46686524822695047 | | Skia | 0.4625749999999999 | | Skia - No RasterCache | 0.47173750000000086| | average_frame_rasterizer_time_millis | Time | |--|--| | Impeller | 6.654328519855595 | | Skia - Raster Cache | 0.2534123711340209 * | | Skia - No RasterCache | 0.53424375 | * Adding the `GeometryPainter` seems to have triggered the complexity threshold for raster cache. <img alt="screenshot" width="320" src="https://github.com/flutter/flutter/assets/96958/7a2f9384-b512-477b-bffa-058d4d284a41"/>
-
- 17 Jul, 2023 1 commit
-
-
LongCatIsLooong authored
Deprecate `textScaleFactor` in favor of `textScaler`, in preparation for Android 14 [Non-linear font scaling to 200%](https://developer.android.com/about/versions/14/features#non-linear-font-scaling). The `TextScaler` class can be moved to `dart:ui` in the future, if we decide to use the Android platform API or AndroidX to get the scaling curve instead of hard coding the curve in the framework. I haven't put the Flutter version in the deprecation message so the analyzer checks are failing. Will do so after I finish the migration guide. **Why `TextScaler.textScaleFactor`** The author of a `TextScaler` subclass should provide a fallback `textScaleFactor`. By making `TextScaler` also contain the `textScaleFactor` information it also makes it easier to migrate: if a widget overrides `MediaQueryData.textScaler` in the tree, for unmigrated widgets in the subtree it would also have to override `MediaQueryData.textScaleFactor`, and that makes it difficult to remove `MediaQueryData.textScaleFactor` in the future. ## A full list of affected APIs in this PR Deprecated: The method/getter/setter/argument is annotated with a `@Deprecated()` annotation in this PR, and the caller should replace it with `textScaler` instead. Unless otherwise specified there will be a Flutter fix available to help with migration but it's still recommended to migrate case-by-case. **Replaced**: The method this `textScaleFactor` argument belongs to is rarely called directly by user code and is not overridden by any of the registered custom tests, so the argument is directly replaced by `TextScaler`. **To Be Deprecated**: The method/getter/setter/argument can't be deprecated in this PR because a registered customer test depends on it and a Flutter fix isn't available (or the test was run without applying flutter fixes first). This method/getter/setter/argument will be deprecated in a followup PR once the registered test is migrated. ### `Painting` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `InlineSpan.build({ double textScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getParagraphStyle({ double TextScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getTextStyle({ double TextScaleFactor = 1.0 })` argument| Deprecated | Can't replace: https://github.com/superlistapp/super_editor/blob/c47fd38dca4b7f43611690913b551a1773c563d7/super_editor/lib/src/infrastructure/super_textfield/desktop/desktop_textfield.dart#L1903-L1905| | `TextPainter({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `TextPainter.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `TextPainter.computeWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | | `TextPainter.computeMaxIntrinsicWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | ### `Rendering` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `RenderEditable({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderEditable.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `RenderParagraph({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderParagraph.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | ### `Widgets` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `MediaQueryData({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/test/text_scale_factor_test.dart#LL39C21-L39C35 | | `MediaQueryData.textScaleFactor` getter | Deprecated | | | `MediaQueryData.copyWith({ double? TextScaleFactor })` argument | Deprecated | | | `MediaQuery.maybeTextScaleFactorOf(BuildContext context)` static method | Deprecated | No Flutter Fix, not expressible yet | | `MediaQuery.textScaleFactorOf(BuildContext context)` static method | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/_functions_io.dart#L68-L70, No Flutter Fix, not expressible yet | | `RichText({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843 | | `RichText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away| | `Text({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/914d120da12fba458c020210727831c31bd71041/packages/rfw/lib/src/flutter/core_widgets.dart#L647 , No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | | `EditableText({ double? TextScaleFactor = 1.0 })` constructor argument | Deprecated | No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `EditableText.textScaleFactor` getter | Deprecated | | ### `Material` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `SelectableText({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843, No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | A lot of material widgets (`Slider`, `RangeSlider`, `TimePicker`, and different types of buttons) also change their layout based on `textScaleFactor`. These need to be handled in a case-by-case fashion and will be migrated in follow-up PRs.
-
- 12 Jul, 2023 1 commit
-
-
Srujan Gaddam authored
JSNumber.toDart will now be two functions: toDartDouble and toDartInt. There was code that did an Object.toJS. This has been changed to use Function.toJS as well to make it consistent with the code in flutter/packages: https://github.com/flutter/packages/blob/0ef393811d0c2653e68ac135733353fcad8fffa9/packages/web_benchmarks/lib/src/recorder.dart#L1223 This is to help land this CL: https://dart-review.googlesource.com/c/sdk/+/309082 https://dart-review.googlesource.com/c/sdk/+/309081 is the CL that added the new methods. ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing.
-
- 29 Jun, 2023 1 commit
-
-
Jackson Gardner authored
This enables benchmarks for the Skwasm renderer, compiled with dart2wasm. Platform views aren't supported in Skwasm yet, so we are skipping those benchmarks for now.
-
- 21 Jun, 2023 1 commit
-
-
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.
-
- 15 Jun, 2023 1 commit
-
-
Mouad Debbar authored
- Bumps `vm_service` from `11.6.0` to `11.7.1` - Bumps `web` from `0.1.3-beta` to `0.1.4-beta` and adds it everywhere. - Moves `js` from `dependencies` to `dev_dependencies`
-
- 08 Jun, 2023 1 commit
-
-
Jackson Gardner authored
This attempts to reland https://github.com/flutter/flutter/pull/126848 This was reverted because it made some unexpected changes to our perf measurements. After landing https://github.com/flutter/flutter/pull/127900, we have much less noise in our benchmarks, so I'd like to reland this and see if there is still a significant measurement difference.
-
- 31 May, 2023 1 commit
-
-
Jackson Gardner authored
By default, the browser fuzzes the timer APIs such that they have a granularity of approximately 100 microseconds (this is due to Spectre mitigation techniques). However, many of the thing we are trying to measure actually have a much finer granularity than 100 microseconds. As a result, many of our benchmarks are extremely noisy and don't provide accurate data. By serving the initial script files with the `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp` HTTP headers, the browser runs the benchmarks in a `crossOriginIsolated` context, which restores the fine granularity of APIs such as `performance.now()` to microsecond precision. Also, we were considering anything an outlier that was more than one standard deviation away from the mean. In a normal distribution, that means we are only capturing 68% of the data and the rest are considered outliers. This is not ideal. Doing two standard deviations away captures 95% of the data, and the outliers are in the remaining 5%, which seems much more reasonable.
-
- 26 May, 2023 1 commit
-
-
Phil Quitslund authored
The newly updated lint will soon flag for-each in collections. See discussion: https://github.com/dart-lang/linter/pull/4383 /cc @goderbauer
-
- 24 May, 2023 1 commit
-
-
Mouad Debbar authored
Now that `platformViewRegistry` is [exposed](https://github.com/flutter/engine/pull/41877) through `dart:ui_web`, we can do some cleanup here. Part of https://github.com/flutter/flutter/issues/126831
-
- 19 May, 2023 2 commits
-
-
Phil Quitslund authored
The upcoming linter release notices null literals as unnecessary argument values and flags more `type_literal_in_constant_pattern` cases. See breakages: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8780744067138629361/+/u/analyze_flutter_flutter/stdout
-
joshualitt authored
Reverts flutter/flutter#126848 Triggered some kind of measuring discrepancy / performance regression.
-
- 18 May, 2023 1 commit
-
-
joshualitt authored
-
- 15 May, 2023 1 commit
-
-
Jonah Williams authored
Add a benchmark that measures the improvements from https://github.com/flutter/engine/pull/41803
-
- 05 May, 2023 1 commit
-
-
Mouad Debbar authored
Removing the dependency between web benchmarks and `url_launcher`'s `Link` widget.
-
- 24 Apr, 2023 1 commit
-
-
Taha Tesser authored
This adds a performance test for `Slider` and `RangeSlider` to run on Android. This is to measure upcoming changes to these widgets and compare their performance. https://user-images.githubusercontent.com/48603081/233633349-0bcad3c3-04a9-42dd-acd0-46b76ce51178.mp4
-
- 11 Apr, 2023 1 commit
-
-
Mouad Debbar authored
[web] Add benchmarks for the Material3 Components screen
-
- 31 Mar, 2023 1 commit
-
-
Jonah Williams authored
[devicelab] add regular old blur benchmark
-
- 23 Mar, 2023 1 commit
-
-
Michael Goderbauer authored
-
- 22 Mar, 2023 1 commit
-
-
Michael Goderbauer authored
Remove 1745 decorative breaks
-
- 23 Feb, 2023 1 commit
-
-
Lioness100 authored
* Fix typos * lowercase animated & opacity * Undo typo fix --------- Co-authored-by: Michael Goderbauer <goderbauer@google.com>
-
- 18 Feb, 2023 1 commit
-
-
Michael Goderbauer authored
* Remove more references to dart:ui.window * two more doc referenes * revert icon_color_test.dart
-
- 02 Feb, 2023 1 commit
-
-
Michael Goderbauer authored
* Make Flex,Row,Column const for real * dart fix --apply * fix snippets * fix integration test * add comment
-
- 27 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
-
- 26 Jan, 2023 1 commit
-
-
Todd Volkert authored
This updates the framework to provide higher level wrappers around ui.instantiateImageCodecWithSize(). Functionally, this doesn't change anything (other than deprecating the older loadBuffer() method in favor of loadImage()), but it sets the stage for a simpler change that will allow us to provide a more flexible way to load sized images. #118543
-
- 20 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* Remove unnecessary null checks in dev/benchmarks * empty
-
- 20 Dec, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 11 Dec, 2022 1 commit
-
-
Ian Hickson authored
-
- 29 Nov, 2022 1 commit
-
-
Jonah Williams authored
* [devicelab] track performance of animated image filter * ++ * make animations repeat and add dispose * make duration more consistently 10sec
-
- 06 Sep, 2022 1 commit
-
-
Dan Field authored
-
- 22 Aug, 2022 1 commit
-
-
Kate Lovett authored
-
- 28 Jul, 2022 1 commit
-
-
Michael Goderbauer authored
-