Status Update
Comments
ma...@google.com <ma...@google.com>
so...@google.com <so...@google.com> #2
Looking at the CL, I'm not sure how it could cause a regression. It looks like a change in the linter. Is it possible that we had a device change during that time?
ez...@gmail.com <ez...@gmail.com> #3
When the dashboard files a bug it unfortunately puts a wrong CL range. It is this one:
so...@google.com <so...@google.com> #4
Actually this is the first time I see these tools - so what exactly is slower ?
George,
it is hard to believe that adding 1 draw annotation would cause that much of a slowdown.
Which is all I wanted: a RenderNode annotation in the skia image.
ch...@google.com <ch...@google.com> #5
po...@google.com <po...@google.com>
ap...@google.com <ap...@google.com> #6
As far as the benchmark regressions are concerned, I believe this particular benchmark incurs more overhead in the worse case scenario that might not map directly to re-world performance. Because we are drawing text into a separate layer first, we are paying an additional (usually one time cost) of this caching work. However, we would see a benefit of subsequent draws of text being much faster as long as the text content doesn't change.
In
androidx.ui.benchmark.test.TextInColumnBenchmark_first_draw_100_
we see a regression because this test repeatedly tears down and rebuilds the compose UI. This requires fully reconstructing the entire text composable as well as the overhead associated with creating the layer which we did not have before.
Similarly in androidx.ui.benchmark.test.TextInColumnBenchmark_toggleRectangleColor_draw_100_
it looks like each time the toggle is changed, we are modifying the font size which again would require recreating the layer before drawing again negatively impacting this particular benchmark's performance.
Alternatively, this would explain the performance improvements that we are seeing in the Checkbox/RadioGroup test cases. In these cases we are toggling state that ends up modifying the Checkbox or RadioGroup but not the Text composable across recompositions. We are seeing the performance gain of drawing the content from the separate layer rather than having to draw the text directly to the screen.
Generally, this seems like a tradeoff between startup benchmarks and iterative ones. If we invest in solutions to cache and re-use results across invocations, we will see benchmark improvements across subsequent draw calls, however, we will see performance regressions in startup performance. I think it is great we are tracking the differences across all benchmarks but in this particular scenario it might be more appropriate to see how this particular change behaves in more real world scenarios. From a personal perspective, I think this change is an overall benefit as we would see better performance in animation like scenarios especially when UI elements around the Text are changing which would cause re-draws for the AndroidComposeView or other layer the composables might be animating within.
Description
Build: AI-202.7319.50.42.6863838, 202009251539,
AI-202.7319.50.42.6863838, JRE 11.0.8+10-b944.6842174x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080, 1920x1080
AS: 4.2 Canary 13; Kotlin plugin: 1.4.10-release-Studio4.2-1; Android Gradle Plugin: 4.2.0-alpha13; Gradle: 6.7; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please readhttps://developer.android.com/studio/report-bugs.html carefully and supply all required information.
Compose Version : 1.0.0-alpha05
I'm building an app that's all RTL. I have an Alert Dialog in it, but the text inside the dialog isn't following RTL. I tried changing the alignment of the text, wrapping the Alert Dialog inside an RTL provider, wrapping the text inside an RTL provider, but nothing works.
Is something wrong with the component? Or is tehre something I'm not doing?