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

Transform comparison #237

Merged
merged 2 commits into from
Jan 26, 2023
Merged

Conversation

Thecentury
Copy link
Contributor

@Thecentury Thecentury commented Dec 26, 2022

Provided a custom equality comparer for types implementing the ITransform interface.
Types implementing the ITransform don't override equality methods, so using them in FuncUI means reassignments on every view generation (if transforms are created on the fly instead of reusing the same instance, producing an object not equal to the previous one even if it's created with the same constructor arguments as default Equals compares references). And such reassignment means an additional layout/redraw pass.

Types implementing ITransform don't override equality methods, so using them in FuncUI means reassignments on every view generation (if caching is not possible). And such reassignment means additional layout/redraw pass.
Copy link
Collaborator

@JordanMarr JordanMarr left a comment

Choose a reason for hiding this comment

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

Very nice optimization!

@JordanMarr JordanMarr merged commit e77b874 into fsprojects:master Jan 26, 2023
@Thecentury Thecentury deleted the transform-comparison branch April 22, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants