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

Pool node collections in analyzer driver. #67776

Merged
merged 5 commits into from
Apr 25, 2023

Conversation

CyrusNajmabadi
Copy link
Member

Addresses garbage allocations in this path:

image

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner April 12, 2023 18:11
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Analyzers untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 12, 2023
{
executeSyntaxNodeActions(analyzer, groupedActionsForAnalyzer, nodesToAnalyze);
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

specialized the codepath where we need to filter. if we don't need to filter, we can pass the data along as is. otherwise, we make a temp copy and pass that along.

{
executeSyntaxNodeActions(analyzer, groupedActionsForAnalyzer, nodesToAnalyze);
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

specialized the codepath where we need to filter. if we don't need to filter, we can pass the data along as is. otherwise, we make a temp copy and pass that along.

@CyrusNajmabadi
Copy link
Member Author

@mavasani @jcouv ptal.

@CyrusNajmabadi
Copy link
Member Author

@333fred @RikkiGibson ptal.

@RikkiGibson RikkiGibson self-assigned this Apr 20, 2023
}
}

void executeOperationsActionsByKind(AnalysisScope analysisScope, ImmutableArray<IOperation> operationsToAnalyze, GroupedAnalyzerActions groupedActions, bool arePerSymbolActions)
void executeOperationsActionsByKind(ImmutableArray<IOperation> operationsToAnalyze, GroupedAnalyzerActions groupedActions, bool arePerSymbolActions)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am guessing this didn't show prominently enough in the trace to do the same optimization on it?

Copy link
Member Author

Choose a reason for hiding this comment

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

correct :)

@CyrusNajmabadi
Copy link
Member Author

@333fred @jcouv ptal.

@CyrusNajmabadi
Copy link
Member Author

@cston ptal.

@CyrusNajmabadi CyrusNajmabadi merged commit 6ef54a7 into dotnet:main Apr 25, 2023
@CyrusNajmabadi CyrusNajmabadi deleted the poolNodeCollections2 branch April 25, 2023 19:36
@ghost ghost added this to the Next milestone Apr 25, 2023
@dibarbet dibarbet modified the milestones: Next, 17.7 P1 Apr 25, 2023
@mavasani mavasani added the Performance-Scenario-Diagnostics This issue affects diagnostics computation performance for lightbulb, background analysis, tagger. label May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Analyzers Performance-Scenario-Diagnostics This issue affects diagnostics computation performance for lightbulb, background analysis, tagger. untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants