Skip to content

Optimize ProjectDependencyGraph.DoesProjectTransitivelyDependOnProject#76399

Merged
ToddGrun merged 1 commit intodotnet:mainfrom
ToddGrun:dev/toddgrun/PDG_DoesProjectTransitivelyDependOnProject_Perf
Dec 13, 2024
Merged

Optimize ProjectDependencyGraph.DoesProjectTransitivelyDependOnProject#76399
ToddGrun merged 1 commit intodotnet:mainfrom
ToddGrun:dev/toddgrun/PDG_DoesProjectTransitivelyDependOnProject_Perf

Conversation

@ToddGrun
Copy link
Contributor

I believe that this method unnecessarilly obtains the reverse dependencies when the forward references are already defined. If the forward references are present, we should just use the result of trying to find the potential dependencies in it.

DoesProjectTransitivelyDependOnProject shows as 2.9% of allocations and 1.6% of CPU in the typing scenario in the scharp editing speedometer test. Will kick off a test insertion and see what those numbers are with this change.

*** CPU before change ***
image

*** Allocations before change ***
image

I believe that this method unnecessarilly obtains the reverse dependencies when the forward references are already defined. If the forward references are present, we should just use the result of trying to find the potential dependencies in it.

DoesProjectTransitivelyDependOnProject shows as 2.9% of allocations and 1.6% of CPU in the typing scenario in the scharp editing speedometer test. Will kick off a test insertion and see what those numbers are with this change.
@ToddGrun ToddGrun requested a review from a team as a code owner December 12, 2024 19:57
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 12, 2024
@ToddGrun
Copy link
Contributor Author

ToddGrun commented Dec 12, 2024

Test Insertion: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/598266

Update: Test insertion numbers didn't improve as much as hoped, but there is a bit of variance in this test that might account for that. I'm going to go ahead and merge, as I think this is a good change. Will take another peek a bit further into this stack to see if anything else sticks out.

@ToddGrun ToddGrun changed the title Optimize ProductDependencyGraph.DoesProjectTransitivelyDependOnProject Optimize ProjectDependencyGraph.DoesProjectTransitivelyDependOnProject Dec 13, 2024
@ToddGrun ToddGrun merged commit da337da into dotnet:main Dec 13, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 13, 2024
@dibarbet dibarbet modified the milestones: Next, 17.13 P3 Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants