Skip to content

Conversation

takahirom
Copy link
Owner

@takahirom takahirom commented Mar 23, 2025

It seems that calling org.robolectric.RuntimeEnvironment.setQualifiers() takes some time.
image

@takahirom takahirom changed the title Improve compose config performance Improve compose config performance for Compose Preview Support Mar 23, 2025
@takahirom takahirom changed the base branch from main to tm/rename-debuglog-to-roborazzidebuglog-and-update-usages-across-the-codebase/2025-03-23 March 23, 2025 03:44
…es-across-the-codebase/2025-03-23' into tm/improve-compose-config-performance/2025-03-23
@takahirom takahirom changed the base branch from tm/rename-debuglog-to-roborazzidebuglog-and-update-usages-across-the-codebase/2025-03-23 to tm/log-robolectric-qualifiers-in-roborazzidebuglog-during-compose-options-setup/2025-03-23 March 23, 2025 03:58
@takahirom
Copy link
Owner Author

We need to understand why the diff is being shown.

@takahirom
Copy link
Owner Author

com.github.takahirom
.preview.tests.Previ
ewsKt.PreviewWithWid
th.Preview_width_API
_LEVEL_30_W500dp_com
pare.png
@Preview(
  name = "Preview width",
  widthDp = 500,
  // These properties are not supported by Roborazzi yet.
  apiLevel = 30
)
@Composable
fun PreviewWithWidth() {
  Card(
    Modifier.fillMaxSize()
  ) {
    Text(
      modifier = Modifier.padding(8.dp),
      text = "Hello, World!"
    )
  }
}
Roborazzi: Robolectric RuntimeEnvironment.getQualifiers() com.github.takahirom.roborazzi.RoborazziPreviewParameterizedTests.test: en-ldltr-sw393dp-w393dp-h851dp-normal-long-notround-nowidecg-lowdr-port-notnight-440dpi-finger-keyshidden-nokeys-navhidden-nonav
Roborazzi: com.github.takahirom.preview.tests.PreviewsKt.PreviewWithWidth.Preview_width_API_LEVEL_30_W500dp.png The image size is changed. actual = (1375, 2334), golden = (1375, 2337)

I think it has the same qualifiers.

@takahirom
Copy link
Owner Author

It seems that the hight has been changed.
image

@takahirom
Copy link
Owner Author

I think the new image is closer to h851dp than before.

@takahirom takahirom changed the base branch from tm/log-robolectric-qualifiers-in-roborazzidebuglog-during-compose-options-setup/2025-03-23 to main April 5, 2025 09:07
Repository owner deleted a comment from github-actions bot Apr 5, 2025
Copy link

github-actions bot commented Apr 5, 2025

@takahirom takahirom merged commit 14ec932 into main Apr 5, 2025
7 checks passed
@takahirom takahirom deleted the tm/improve-compose-config-performance/2025-03-23 branch April 5, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant