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

Border updates stroke too frequently #24123

Closed
Foda opened this issue Aug 9, 2024 · 1 comment · Fixed by #24125
Closed

Border updates stroke too frequently #24123

Foda opened this issue Aug 9, 2024 · 1 comment · Fixed by #24125
Assignees
Labels
area-controls-border Border area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.90 fixed-in-9.0.0-rc.1.24453.9 platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 potential-regression This issue described a possible regression on a currently supported version., verification pending t/bug Something isn't working
Milestone

Comments

@Foda
Copy link
Member

Foda commented Aug 9, 2024

Description

The border control will rebuild the stroke shape when any property changes on the StrokeShape object, including:

  • Window
  • Parent

This causes a significant performance impact when items are added to a list.

This is caused by the following in Controls\src\Core\Border\Border.cs:

_strokeShapeChanged ??= (sender, e) => OnPropertyChanged(nameof(StrokeShape));

These property changes should not trigger a rebuild of the stroke shape since the Border.OnPropertyChanged event only wants to be notified of the following:

  • Height
  • Width
  • StrokeThickness
  • StrokeShape
  • StrokeDashArray

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.80 SR8

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@Foda Foda added t/bug Something isn't working area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-controls-border Border labels Aug 9, 2024
@Foda Foda self-assigned this Aug 9, 2024
Copy link
Contributor

github-actions bot commented Aug 9, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@PureWeen PureWeen added this to the .NET 8 SR9 milestone Aug 9, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Aug 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2024
@samhouts samhouts added platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 platform/android 🤖 platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending labels Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-border Border area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.90 fixed-in-9.0.0-rc.1.24453.9 platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 potential-regression This issue described a possible regression on a currently supported version., verification pending t/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants