Conversation
The max length is 72, see MILCMD_DRAW_ROUNDED_RECTANGLE_ANIMATE
|
|
||
| ~RenderData() | ||
| { | ||
| ArrayPool<byte>.Shared.Return(_buffer); |
There was a problem hiding this comment.
Can this just be "disposed" normally? Using a finalizer is quite heavy and puts pressure on the GC's finalizer queue. Especially with
The max length is 72
in mind, maybe it's just cheaper to allocate and let the GC clean up.
Or as there is unsafe code already involved use a struct with fixed sized buffer of that size, and wrap by a span for access outside that class?
|
@lindexi maybe you should delete the field altogether _buffer |
|
@kronic Thank you. But I find it hard to delete the |
|
@dipeshmsft |
|
@omariom We mainly use sample applications to review the performance benefits and we rely on our regression suite to check any performance regressions. |
|
@dipeshmsft Thank you. |
|
@dipeshmsft |
|
@omariom , we are working on open-sourcing the complete test-suite. You can check the repo dotnet/wpf-test , but the task is still in progress. @gurpreet-wpf |
|
@dipeshmsft Can I publish my private WPF framework version? |
|
@vishalmsft @gurpreet-wpf Could you take a look at this ?? |
|
@lindexi do you mean tests written and available in your private repo? |
|
@vishalmsft I mean that can I publish my nuget package which include my private WPF framework version? Some of my friends can't wait for the official WPF release. I expect to provide a private version for them to use. Thank you. |
|
And this version wpf framework may used in the business application. |
Description
Using ArrayPool in RenderData. The max length is 72, see MILCMD_DRAW_ROUNDED_RECTANGLE_ANIMATE
wpf/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/RenderData.cs
Lines 149 to 184 in 89d172d
Customer Impact
None. But it will affect the rendering of all DrawingVisual and UIElement
Regression
dotnet 7
Testing
Just CI and my demo
Risk
Low