Repository navigation
Conversation
Coverage (unit tests)Compared against
Line and branch coverage from unit test reports. History is recorded on the |
Contributor
Coverage (instrumentation tests)
|
This was referenced Nov 2, 2026
…maps-compose-widgets Add a :baselineprofile module that generates the profiles from the maps-app demos, and package the generated baseline-prof.txt in the three library AARs. It also contains a StartupBenchmark to measure the effect.
kikoso
force-pushed
the
feat/baseline-profiles
branch
from
November 3, 2026 03:32
68d7a25 to
066ee0e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
None of the three libraries ship a Baseline Profile today, so apps using them run the map setup, marker and clustering code interpreted/JIT until ART compiles it. This PR adds the profiles and the tooling to regenerate them.
:baselineprofilemodule (com.android.test, Benchmark 1.5.0) targetingmaps-app.BaselineProfileGeneratoropens the demos that cover the public API (basic map, map in column, advanced markers, clustering, markers collection, draggable markers with polygon, tile and ground overlays, ScaleBar), pans and zooms the map in each one.maps-compose,maps-compose-utilsandmaps-compose-widgetsapply theandroidx.baselineprofileconsumer plugin, so the generatedsrc/main/generated/baselineProfiles/baseline-prof.txtgets packaged in the AAR (882, 110 and 31 rules).StartupBenchmarkcompares cold startup and frame timing of the markers and clustering demos withCompilationMode.Noneagainst the Baseline Profiles. To run on a physical device:./gradlew :baselineprofile:connectedBenchmarkReleaseAndroidTest.A few points worth to mention
nonMinifiedReleaseandbenchmarkReleaseinmaps-app(same with Benchmark 1.6.0-alpha01 and withandroid.newDsl=false), and the generation then silently runs 0 tests. They are declared explicitly inmaps-app/build.gradle.ktswith the same settings the plugin would apply (not minified, not debuggable, profileable, no coverage instrumentation, debug signing). We can drop them once the plugin handles it.maps-appusescom.google.maps.android.composeas well, and the plugin filter only supportspkg.**,pkg.*or exact class names, so 357 of the 1,239 rules ofmaps-composewere demo classes (MainActivity,DemoKt,ComposableSingletons$BasicMapActivityKt...). A small step aftercopyBaselineProfileIntoSrckeeps only the rules for classes this library compiles (D8$$ExternalSynthetic*and$-CCclasses are kept for their owner).maps-compose-utilsandmaps-compose-widgetshave their own packages, so the filter is enough there.StreetViewActivitycrashes when driven by the generator on API 36, so is left out of the journey for now.am start -Winstead ofstartActivityAndWait, which could not confirm the launch on the map screens..modulehave no reference to:baselineprofile, and ProfileInstaller already comes transitively with Compose.Testing
baseline-prof.txtis present in the three release AARs and absent of demo classes.assembleDebug,lintand the CIbuild koverXmlReportDebugcommand pass locally.