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

[automated] Merge branch 'release/8.0' => 'release/8.0-staging' #108495

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Oct 2, 2024

I detected changes in the release/8.0 branch which have not been merged yet to release/8.0-staging. I'm a robot and am configured to help you automatically keep release/8.0-staging up to date, so I've opened this PR.

This PR merges commits made on release/8.0 by the following committers:

  • vseanreesermsft

Instructions for merging from UI

This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.

merge button instructions

If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.

Instructions for merging via command line

Run these commands to merge this pull request from the command line.

git fetch
git checkout release/8.0
git pull --ff-only
git checkout release/8.0-staging
git pull --ff-only
git merge --no-ff release/8.0

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet/runtime HEAD:merge/release/8.0-to-release/8.0-staging
or if you are using SSH
git push [email protected]:dotnet/runtime HEAD:merge/release/8.0-to-release/8.0-staging

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

Instructions for updating this pull request

Contributors to this repo have permission update this pull request by pushing to the branch 'merge/release/8.0-to-release/8.0-staging'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.

git checkout -b merge/release/8.0-to-release/8.0-staging release/8.0-staging
git pull https://github.com/dotnet/runtime merge/release/8.0-to-release/8.0-staging
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet/runtime HEAD:merge/release/8.0-to-release/8.0-staging
or if you are using SSH
git checkout -b merge/release/8.0-to-release/8.0-staging release/8.0-staging
git pull [email protected]:dotnet/runtime merge/release/8.0-to-release/8.0-staging
(make changes)
git commit -m "Updated PR with my changes"
git push [email protected]:dotnet/runtime HEAD:merge/release/8.0-to-release/8.0-staging

Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.

Mirroring and others added 19 commits July 26, 2024 18:57
… extension data.

Bug fix to address performance issues when deserializing large payloads in `JsonObject` extension data.

Mitigates performance issues by optimizing the deserialization process for large `JsonObject` extension data properties.
- Added `LargeJsonObjectExtensionDataSerializationState` class in `System.Text.Json.Serialization.Converters` to handle large payloads efficiently.
- Updated `JsonObjectConverter` to use the new state class for large objects.
- Modified `ObjectDefaultConverter`, `ObjectWithParameterizedConstructorConverter`, and `ReadStackFrame` to complete deserialization using the new state class.
- Added tests in `JsonObjectTests` to validate the performance improvements with large payloads.
This improves the performance of removing extra fields in the ZipArchive by optimizing the removal process.

`src/libraries/System.IO.Compression/src/System/IO/Compression/ZipBlocks.cs`: Replaced multiple iterations and list operations with a single `RemoveAll` call to enhance efficiency.
This ports a fix for the `GetParts` method to improve part URI handling and collision detection.

`src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs`: Added sorting of parts array to ensure proper order, introduced a dictionary and list to track parts and detect collisions, and implemented a new method `CopyPartDictionaryToPartList` to copy parts to `_partList`.
…l TFMs

Note that Microsoft.Extensions.Caching.Memory is deployed OOB via NuGet, and multi-targets including support for netfx and ns2.0

Marvin is the string hashing used in modern .NET (https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Marvin.cs); this change extends this behaviour to `string` keys when used with `MemoryCache` - noting that in many scenarios we *expect* the key to be a `string` (even though other types are allowed)

To do this we:

- ~~add a custom key equality comparer for use with `ConcurrentDictionary<object, CacheEntry>` (we do this on all TFMs, replacing the need for the dynamic lookup via `EqualityComparer<TKey>.Default`)~~
- split the internal dictionary into 2 - one for `string`, one for everything else
- in down-level TFMs only, provide a custom `string` key comparer with `MarvinHash` enabled (local snapshot since not available)

This gives us Marvin everywhere, and Marvin+rehash on netcore TFMs (rehash requires `TKey` === `string`)
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

vseanreesermsft and others added 2 commits October 8, 2024 10:33
* Fix performance issue when deserializing large payloads in JsonObject extension data.

Bug fix to address performance issues when deserializing large payloads in `JsonObject` extension data.

Mitigates performance issues by optimizing the deserialization process for large `JsonObject` extension data properties.
- Added `LargeJsonObjectExtensionDataSerializationState` class in `System.Text.Json.Serialization.Converters` to handle large payloads efficiently.
- Updated `JsonObjectConverter` to use the new state class for large objects.
- Modified `ObjectDefaultConverter`, `ObjectWithParameterizedConstructorConverter`, and `ReadStackFrame` to complete deserialization using the new state class.
- Added tests in `JsonObjectTests` to validate the performance improvements with large payloads.

* ZipArchive: Improve performance of removing extra fields

This improves the performance of removing extra fields in the ZipArchive by optimizing the removal process.

`src/libraries/System.IO.Compression/src/System/IO/Compression/ZipBlocks.cs`: Replaced multiple iterations and list operations with a single `RemoveAll` call to enhance efficiency.

* Packaging: Port fix for GetParts from .NETFramework

This ports a fix for the `GetParts` method to improve part URI handling and collision detection.

`src/libraries/System.IO.Packaging/src/System/IO/Packaging/Package.cs`: Added sorting of parts array to ensure proper order, introduced a dictionary and list to track parts and detect collisions, and implemented a new method `CopyPartDictionaryToPartList` to copy parts to `_partList`.

* Merged PR 41316: Use Marvin32 instead of xxHash32 in COSE hash codes

* Microsoft.Extensions.Caching.Memory: use Marvin for keys on down-level TFMs

Note that Microsoft.Extensions.Caching.Memory is deployed OOB via NuGet, and multi-targets including support for netfx and ns2.0

Marvin is the string hashing used in modern .NET (https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Marvin.cs); this change extends this behaviour to `string` keys when used with `MemoryCache` - noting that in many scenarios we *expect* the key to be a `string` (even though other types are allowed)

To do this we:

- ~~add a custom key equality comparer for use with `ConcurrentDictionary<object, CacheEntry>` (we do this on all TFMs, replacing the need for the dynamic lookup via `EqualityComparer<TKey>.Default`)~~
- split the internal dictionary into 2 - one for `string`, one for everything else
- in down-level TFMs only, provide a custom `string` key comparer with `MarvinHash` enabled (local snapshot since not available)

This gives us Marvin everywhere, and Marvin+rehash on netcore TFMs (rehash requires `TKey` === `string`)

---------

Co-authored-by: Mirroring <[email protected]>
Co-authored-by: Eirik George Tsarpalis <[email protected]>
Co-authored-by: Eric St. John <[email protected]>
Co-authored-by: Jeremy Barton <[email protected]>
Co-authored-by: Marc Gravell <[email protected]>
…24-10-08-1032

Bringing commits over from internal/release/8.0
Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

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

Merge commit.

@carlossanlop carlossanlop added area-codeflow for labeling automated codeflow and removed area-Infrastructure-libraries labels Oct 14, 2024
@carlossanlop carlossanlop merged commit 85e5ef6 into release/8.0-staging Oct 14, 2024
195 of 219 checks passed
@carlossanlop carlossanlop deleted the merge/release/8.0-to-release/8.0-staging branch October 14, 2024 17:23
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-codeflow for labeling automated codeflow Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants