Status Update
Comments
yi...@google.com <yi...@google.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
pa...@google.com <pa...@google.com> #3
pa...@google.com <pa...@google.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
si...@google.com <si...@google.com> #5
The regression for some tests is 30x. Please consider reverting.
yi...@google.com <yi...@google.com> #6
ap...@google.com <ap...@google.com> #7
Branch: androidx-master-dev
commit 338af8a6b3d6a936d06e55720d66133d36df9283
Author: yingleiw <yingleiw@google.com>
Date: Tue Aug 25 14:11:55 2020
Revert "Notify accessibility when semantics node bounds change"
This reverts commit cd4dadf83390f9ecf50e22ff03f21fdafa4bd504.
Reason for revert:
Relnote: remove callback to notify Owner when layoutnode bounds change.
Test: tested manually.
Change-Id: If654ebfbf711c9a7f6bcddb28673e4b6f786d05b
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeViewAccessibilityDelegateCompat.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
yi...@google.com <yi...@google.com>
yi...@google.com <yi...@google.com> #8
I got errors sending out accessibility events for
./gradlew :compose:integration-tests:benchmark:connectedCheck -Pandroid.testInstrumentationRunnerArguments.class=androidx.ui.benchmark.test.TextInColumnBenchmark#toggleRectangleColor_measure
Also, for the following result:
2020-08-26 13:25:25.041 22776-22796/? I/Benchmark: TextInColumnBenchmark.toggleRectangleColor_measure[100][Stats for timeNs: median 10747475, min 9314063, max 12672410, mean 1.087254574E7, standardDeviation: 991142.0110795262, Stats for allocationCount: median 12761, min 12761, max 12761, mean 12761.0, standardDeviation: 0.0]count=4
What does this 100 means?
I also see this 100 in the dash board:
androidx.ui.benchmark.test.TextInColumnBenchmark_toggleRectangleColor_measure_100_
Thanks!
cc...@google.com <cc...@google.com> #9
100 is a parameterization argument - see
In that benchmark, it's the number of columns, and run with both values there. For local debugging, you can comment out 10
so you only see the results for 100
.
Do the benchmark tests have accessibility manager enabled? (if using ui automator, then accessibility manager is enabled)
I don't expect they'd use UI automator - they're pretty standard instrumentation tests, but it's possible some infrastructure is using ui automator, or enabling the accessibility manager. Can you check while running locally?
yi...@google.com <yi...@google.com> #10
So I suppose the benchmarks (at least the TextInColumnBenchmark#toggleRectangleColor_measure) have accessibility manage enabled.
From my current runs, I see the performance degradation is in AndroidAccessibilityDelegateCompatCompat, not in LayoutNodeWrapper (finding the outer semantics).
So it is the building semantic tree and sending too many events caused this.
cc...@google.com <cc...@google.com> #11
Can you try running a more minimal benchmark, and see if the accessibility manager is enabled? E.g. benchmark-benchmark
(note, not part of compose project, have to use frameworks/support/
)
I'm also curious if it's enabled in standard simple instrumentation tests out of the box (e.g. new empty project in studio, run test there).
pw...@google.com <pw...@google.com> #12
yi...@google.com <yi...@google.com> #13
Also, since this benchmark doesn't trigger any view construction, I need to manually log the accessibility manager which needs the context. I see two ways:
one is in ViewInflationBenchmark (
I'm not sure which is the correct one, but I can test both if I can run the benchmark correctly.
yi...@google.com <yi...@google.com> #14
@Test
fun testTwelveKeyInflate() {
val context: Context = activityRule.activity
val accessibilityManager: AccessibilityManager = context.getSystemService(Context
.ACCESSIBILITY_SERVICE) as AccessibilityManager
Log.v("yinglei", "accessibility manager basic ${accessibilityManager.isEnabled}")
val inflater = LayoutInflater.from(context)
val root = FrameLayout(context)
benchmarkRule.measureRepeated {
inflater.inflate(R.layout.twelve_key_entry, root, false)
}
}
The log shows accessibility manager is enabled
yi...@google.com <yi...@google.com> #15
cc...@google.com <cc...@google.com> #16
@Phil, you mention shell commands will enable the accessibility manager:
- Does that mean any shell commands called by any test infra will turn on the accessibility manager?
- What will stop the accessibility manager? Does it stay enabled until the process dies?
- Is it expected that turning this on will cause performance degradation (from additional accessibility work) in UIs, due to additional accessibility work?
@Yinglei - appcompat-benchmark
is good simple test case, likely indicates every benchmark would have accessibility manager enabled, then.
yi...@google.com <yi...@google.com> #17
I think we also want to measure performance with accessibility on for compose.
But for this bug, we do need to improve our accessibility code for performance.
pw...@google.com <pw...@google.com> #18
Since as you might imagine, I'm fine turning on accessibility, I've never looked into other ways of issuing shell commands. So your infrastructure may well be using another path. But if it created a UiAutomation, it turns on accessibility.
Description
Alert on dashboard:https://androidx-perf.skia.org/t/?begin=1598041363&end=1598041364&subset=all
CLs in build:https://android-build.googleplex.com/builds/6782628/branches/aosp-androidx-master-dev/targets/androidx/cls?end=6782525
Culprit: aosp/1384533