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

Allocations: Move stringliteral tokens array to static field #7663

Merged
merged 4 commits into from
Jul 26, 2023

Conversation

martin-strecker-sonarsource
Copy link
Contributor

@martin-strecker-sonarsource martin-strecker-sonarsource commented Jul 24, 2023

Related to #7439

Moving some SyntaxKind[] arrays created by IsAnyKind to a static readonly field saves 350MB:
That array was the 15th most allocated type.

Before
image

After
image

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM!

@@ -115,8 +116,9 @@ node switch

public static SyntaxNode RemoveParentheses(this SyntaxNode expression)
{

Choose a reason for hiding this comment

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

Remove this empty line

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@pavel-mikula-sonarsource pavel-mikula-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM

@pavel-mikula-sonarsource pavel-mikula-sonarsource merged commit 1eba20a into master Jul 26, 2023
@pavel-mikula-sonarsource pavel-mikula-sonarsource deleted the Martin/Alloc_IsStringLiteral branch July 26, 2023 06:21
@cristian-ambrosini-sonarsource cristian-ambrosini-sonarsource added this to the 9.7 milestone Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Performance It takes too long.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants