commit | 9f8296fd0880b0c417d3535597ee2b97aeabd442 | [log] [tgz] |
---|---|---|
author | Ben Trengrove <bentrengrove@google.com> | Mon Jan 16 15:07:05 2023 +1100 |
committer | Ben Trengrove <bentrengrove@google.com> | Mon Jan 16 20:25:50 2023 +0000 |
tree | bf3ed9266d152d80098d6589a972d2f941bfed2d | |
parent | e3befe7d20323d97c0c57d801d14e37413aebc56 [diff] |
Fix regression in SwipeBenchmark After refactoring graphicsLayer to the new Modifier.Node API, a performance regression was introduced just in this benchmark. Reading the code, I believe it is because the way it is written already caches the modifier and so any time the inputs change it needs to be recreated anyway. This is doubling up on the caching provided by Modifier.Node and just adding additional overhead. Switching to graphicsLayer {} seems to fix it in my testing as it doesn't compare GraphicsLayerScope parameters to see if they have changed. Side note, once the other modifiers in this are refactored, I don't believe the derivedStateOf on modifiers would be required anymore. Test: SwipeBenchmark Bug: n/a Relnote: Improved performance of SwipeToDismissBox Test results on a Pixel 6 Pro. // Before SwipeBenchmark_start[compilation=None] frameDurationCpuMs P50 5.7, P90 8.3, P95 9.5, P99 11.3 frameOverrunMs P50 -9.5, P90 -6.4, P95 -5.3, P99 -3.6 SwipeBenchmark_start[compilation=WarmupProfile(iterations=3)] frameDurationCpuMs P50 4.8, P90 6.3, P95 7.2, P99 8.5 frameOverrunMs P50 -10.3, P90 -8.5, P95 -7.9, P99 -6.6 SwipeBenchmark_start[compilation=BaselineProfile] frameDurationCpuMs P50 5.2, P90 7.4, P95 8.3, P99 10.0 frameOverrunMs P50 -10.0, P90 -7.3, P95 -6.6, P99 -4.6 SwipeBenchmark_start[compilation=Full] frameDurationCpuMs P50 4.8, P90 6.2, P95 7.0, P99 9.1 frameOverrunMs P50 -10.4, P90 -8.6, P95 -7.7, P99 -5.5 // After SwipeBenchmark_start[compilation=None] frameDurationCpuMs P50 5.1, P90 7.1, P95 7.9, P99 9.8 frameOverrunMs P50 -10.1, P90 -7.7, P95 -6.8, P99 -4.7 SwipeBenchmark_start[compilation=WarmupProfile(iterations=3)] frameDurationCpuMs P50 4.7, P90 6.2, P95 6.8, P99 8.2 frameOverrunMs P50 -10.7, P90 -8.7, P95 -8.1, P99 -6.6 SwipeBenchmark_start[compilation=BaselineProfile] frameDurationCpuMs P50 5.0, P90 6.8, P95 7.5, P99 10.5 frameOverrunMs P50 -10.3, P90 -7.9, P95 -7.1, P99 -4.8 SwipeBenchmark_start[compilation=Full] frameDurationCpuMs P50 4.6, P90 6.2, P95 6.8, P99 8.3 frameOverrunMs P50 -10.7, P90 -8.7, P95 -8.1, P99 -7.1 Change-Id: I3933b64e8b94a5008a37fd1f26315ed4d8df2eb5
Jetpack is a suite of libraries, tools, and guidance to help developers write high-quality apps easier. These components help you follow best practices, free you from writing boilerplate code, and simplify complex tasks, so you can focus on the code you care about.
Jetpack comprises the androidx.*
package libraries, unbundled from the platform APIs. This means that it offers backward compatibility and is updated more frequently than the Android platform, making sure you always have access to the latest and greatest versions of the Jetpack components.
Our official AARs and JARs binaries are distributed through Google Maven.
You can learn more about using it from Android Jetpack landing page.
For contributions via GitHub, see the GitHub Contribution Guide.
Note: The contributions workflow via GitHub is currently experimental - only contributions to the following projects are being accepted at this time:
When contributing to Jetpack, follow the code review etiquette.
We are not currently accepting new modules.
Head over to the onboarding docs to learn more about getting set up and the development workflow!
Our continuous integration system builds all in progress (and potentially unstable) libraries as new changes are merged. You can manually download these AARs and JARs for your experimentation.
Before uploading your first contribution, you will need setup a password and agree to the contribution agreement:
Generate a HTTPS password: https://android-review.googlesource.com/new-password
Agree to the Google Contributor Licenses Agreement: https://android-review.googlesource.com/settings/new-agreement
AndroidX uses git to store all the binary Gradle dependencies. They are stored in prebuilts/androidx/internal
and prebuilts/androidx/external
directories in your checkout. All the dependencies in these directories are also available from google()
, jcenter()
, or mavenCentral()
. We store copies of these dependencies to have hermetic builds. You can pull in a new dependency using our importMaven tool.