Repository navigation
Conversation
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
The CPU picker currently defaults to the first pair generated by the UI. Before serializing the profile, the app always writes that pair into
execution.selected_cpus, soexecution.recommended_cpuscannot seed the default selection.This PR makes the picker use the effective profile recommendation when that pair is already present in the candidate list:
execution.recommended_cpusfrom the loaded imported profile first;This matches the existing profile merge precedence.
This PR only addresses recommendations that are already available in the generated picker. It does not restore the old UI behavior that inserted a recommended pair spanning frequency clusters. The cross-cluster case needs separate discussion and validation.
Relates to #382.
Regression history
f98c06e9added the manual "select recommended CPU pair" action.48303a9fmergedselected_cpusinto the recommendation slot of the native profile document and established that an explicit UI selection overrides the recommendation.bfbe0026implemented automatic adoption of the recommended pair in the olddevUI, including insertion of cross-frequency-cluster pairs.b61ec7caremoved the old Kotlin UI. Its commit message explicitly records that abandoning the old Kotlin UI was a user decision, but it does not say whether the app should also stop consumingrecommended_cpus.Maintainer question
Was removing the app's automatic use of
execution.recommended_cpusintentional, or was it an omission during the UI migration?There are two possible outcomes:
recommended_cpuscurrently has no effect on the app's default selection. Please do not merge this behavioral fix. Instead, deprecate and remove the field in a separate profile-format change, including the schema, templates, and built-in profiles.I would like to confirm the intended design before treating this as a fix. If removing the behavior was intentional, merging this change would work against that decision. The field should then be removed so profile authors are not left with a setting that appears meaningful but has no effect.
Tests
./gradlew :app:testDebugUnitTest --tests '*CpuPairSelectionTest' --tests '*BuiltinProfilesTest' --tests '*UserProfileStoreTest'passed../gradlew :app:assembleDebugpassed../gradlew :app:testDebugUnitTestran 97 tests. The following three failures also reproduce on clean upstream9b51c391:ExporterAgreementTestNativeDocumentEquivalenceTestProfileMigrationEquivalenceTest