Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifier.sentryTag forces recomposition. #4028

Open
richkzad opened this issue Jan 7, 2025 · 1 comment · May be fixed by #4029
Open

Modifier.sentryTag forces recomposition. #4028

richkzad opened this issue Jan 7, 2025 · 1 comment · May be fixed by #4029
Assignees

Comments

@richkzad
Copy link

richkzad commented Jan 7, 2025

Modifier.sentryTag is creating a new lambda for the semantics property on every call, causing a non-equal Modifier to be created on each recomposition, causing composables to never be skipped.

A simple fix would be to annotate this method with @Composable, so that it could reuse the lambda across subsequent calls.

Otherwise, if that's not an option (it could break assumptions made by developers already), it's likely best to create a Modifier.Node for this.

@romtsn
Copy link
Member

romtsn commented Jan 7, 2025

hi @richkzad thanks for the report, I feel like Modifer.Node was introduced after we shipped the sentryTag and we never looked back at it. We'll investigate further, thanks again!

@getsantry getsantry bot removed the status in GitHub Issues with 👀 3 Jan 7, 2025
@richkzad richkzad linked a pull request Jan 7, 2025 that will close this issue
7 tasks
@markushi markushi self-assigned this Jan 8, 2025
@stefanosiano stefanosiano moved this from Needs Discussion to Needs Review in Mobile & Cross Platform SDK Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Needs Review
Development

Successfully merging a pull request may close this issue.

3 participants