Repository navigation
perf: Experiment with different approach for DP storage - #18093
Youssef1313 wants to merge 3 commits into
Conversation
4b1d4db to
aee1c04
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18093/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18093/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18093/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18093/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18093/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18093/index.html |
ajpinedam
left a comment
There was a problem hiding this comment.
The change looks good, as do the numbers you shared.
|
|
||
| private readonly static ArrayPool<short> _offsetsPool = ArrayPool<short>.Shared; | ||
| private readonly static LinearArrayPool<DependencyPropertyDetails?> _pool = LinearArrayPool<DependencyPropertyDetails?>.CreateAutomaticallyManaged(BucketSize, 16); | ||
| private DependencyPropertyDetails[] _entries = Array.Empty<DependencyPropertyDetails>(); |
There was a problem hiding this comment.
This change basically removes the pooling to allocate every time. This is curious that this leads to improvements.
There was a problem hiding this comment.
Pooling doesn't seem very much beneficial in this case, I think. Those arrays are more commonly long living, while pooling is more useful for short living objects.
334ea2d to
841d49e
Compare
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18093/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18093/index.html |
|
NOTES:
|
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days. |
|
This PR was closed because it has been stalled for 10 days with no activity. |
GitHub Issue (If applicable): closes #
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Too much allocations happening inside DependencyPropertyDetailsCollection for offsets and entries arrays.
What is the new behavior?
This PR experiments an approach that's more memory friendly.
Here is a comparison during SamplesApp startup.
Most significant part of the diff:
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):