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

perf(TextBlock): Removed LINQ when invalidating inlines #16987

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

KevinFerati
Copy link
Contributor

GitHub Issue (If applicable): closes #15805

PR Type

What kind of change does this PR introduce?

  • Other... Please describe: Performance

What is the current behavior?

In a textblock, when the inlines are being invalidated, there's a projection made using LINQ, causing unnecessary allocations.

What is the new behavior?

This simply replaces the Select.ToList instruction to a foreach based one.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

Copy link
Member

@jeromelaban jeromelaban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

src/Uno.UI/UI/Xaml/Controls/TextBlock/TextBlock.cs Outdated Show resolved Hide resolved
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16987/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-16987/index.html

@jeromelaban jeromelaban merged commit 55125fa into unoplatform:master Jun 5, 2024
105 checks passed
Copy link

welcome bot commented Jun 5, 2024

Congrats on your first pull-request! We ❤ the people who are involved in this project, and we’d love to pay it forward by sending you some swag. If you have any feedback (or ideas how to improve Uno as a open-source project) please open a feedback issue.
giphy
Merci beaucoup 👋

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.

[Performance] Avoid LINQ in TextBlock.UpdateHyperlinks
5 participants