Skip to content

Optimize memory allocations (#98702) #99542

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

Merged
merged 11 commits into from
May 15, 2024

Conversation

cd21h
Copy link
Contributor

@cd21h cd21h commented Mar 11, 2024

Use ArrayPool to reduce memory allocations when writing JSON

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 11, 2024
@cd21h cd21h force-pushed the feature/98702-Memory-optimization branch from 14b9674 to 7b0968f Compare March 11, 2024 17:40
@cd21h
Copy link
Contributor Author

cd21h commented Apr 25, 2024

@MichalPetryka Could you take a look, please?

@ericstj ericstj requested review from tarekgh and removed request for MichalPetryka May 13, 2024 18:30
@tarekgh tarekgh self-assigned this May 13, 2024
@tarekgh
Copy link
Member

tarekgh commented May 13, 2024

@cd21h could you please resolve the source conflict to be able to proceed?

Also, for my comment #99542 (review) feel free to address it or if you want can address it in another PR. Thanks!

@tarekgh tarekgh added the needs-author-action An issue or pull request that requires more info or actions from the author. label May 13, 2024
@tarekgh tarekgh added this to the 9.0.0 milestone May 13, 2024
@tarekgh tarekgh force-pushed the feature/98702-Memory-optimization branch from a1acfd4 to 6329581 Compare May 14, 2024 00:41
@dotnet-policy-service dotnet-policy-service bot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label May 14, 2024
@tarekgh
Copy link
Member

tarekgh commented May 14, 2024

@cd21h I have pushed a commit for optimizing the other case in addition to merging main to your branch. Please have a look and let me know if it makes sense to you. Also, could you please accept the license agreement too #99542 (comment)? Thanks!

…m/shatl/dotnet-runtime into feature/98702-Memory-optimization

# Conflicts:
#	src/libraries/Microsoft.Extensions.Logging.Console/src/JsonConsoleFormatter.cs
@cd21h
Copy link
Contributor Author

cd21h commented May 14, 2024

@cd21h please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

@cd21h
Copy link
Contributor Author

cd21h commented May 14, 2024

@tarekgh Looks good to me!

@tarekgh tarekgh merged commit f0ee416 into dotnet:main May 15, 2024
83 checks passed
@cd21h cd21h deleted the feature/98702-Memory-optimization branch May 20, 2024 23:50
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* Optimize memory allocations (dotnet#98702)

* Use `UTF8.GetMaxCharCount`

* Optimize memory allocations (dotnet#98702)

* Use `UTF8.GetMaxCharCount`

* Optimize netfx/netstandard 2.0 cases too

* Fix formatting

* Fix build error

---------

Co-authored-by: Tarek Mahmoud Sayed <tarekms@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-Logging community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants