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

DependencyIDs create a lot of long, duplicate strings #5051

Closed
panopticoncentral opened this issue Jul 14, 2019 · 9 comments · Fixed by #6282
Closed

DependencyIDs create a lot of long, duplicate strings #5051

panopticoncentral opened this issue Jul 14, 2019 · 9 comments · Fixed by #6282
Assignees
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Performance-Scenario-Solution-Open This issue affects solution open performance. Tenet-Performance This issue affects the "Performance" tenet. Triage-Approved Reviewed and prioritized
Milestone

Comments

@panopticoncentral
Copy link
Contributor

I don't have exact numbers, but looking at the GC heap of a large CPS solution, there are a lot of duplicate strings showing up that are DependencyIDs. The problem is that DependencyIDs tend to be very long and are generated on the fly, so common child IDs end up wasting a lot of space. (In a solution with 520 projects, one common dependency ID is duplicated 4k times and wastes nearly 1Mb all on its own.)

We should find a way to intern these so that we're not duplicating them all over the place.

@panopticoncentral panopticoncentral added Bug Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references labels Jul 14, 2019
@drewnoakes drewnoakes self-assigned this Jul 14, 2019
@davkean
Copy link
Member

davkean commented Jul 15, 2019

Do we need to create these ids at all? @drewnoakes Do you know what we use them for?

@panopticoncentral
Copy link
Contributor Author

A fair question... The big waste is the fact that Dependency objects use the IDs to connect parent/child Dependencies. If there's no reason to have things be disconnected, direct references would be much more efficient.

@drewnoakes
Copy link
Member

It may be possible to avoid creating them altogether for graph nodes (which allow composite IDs). I took a stab at that a long while back but didn't quite get it working. I'm more familiar with the code now so may have better results. I can take a look, probably in the next sprint.

@davkean
Copy link
Member

davkean commented Jul 15, 2019

I would imagine that's where the majory of duplicated strings would be created, but I do wonder how they are being created if they are created on demand.

@drewnoakes drewnoakes added the Tenet-Performance This issue affects the "Performance" tenet. label Jul 18, 2019
@davkean davkean closed this as completed Jan 20, 2020
@davkean davkean reopened this Jan 20, 2020
@davkean davkean added this to the 16.6 milestone Jan 20, 2020
@davkean davkean added the Triage-Approved Reviewed and prioritized label Jan 20, 2020
@panopticoncentral panopticoncentral added the Performance-Scenario-Solution-Open This issue affects solution open performance. label Mar 14, 2020
@drewnoakes drewnoakes modified the milestones: 16.6, 16.7 Mar 25, 2020
@drewnoakes
Copy link
Member

This situation has been improved significantly in #6155. Pending task is to inspect new heaps and see whether this is still an issue.

@drewnoakes
Copy link
Member

The big waste is the fact that Dependency objects use the IDs to connect parent/child Dependencies.

Since #6155 this is no longer the case.

Analysis of recent dumps shows that dependency IDs are no longer contributing in a significant fashion to heap consumption.

@panopticoncentral
Copy link
Contributor Author

So awesome! Thanks so much for your hard work on this!

@drewnoakes
Copy link
Member

#6276 further reduces the size of the dependency IDs by removing the TFM prefix from all of them.

@drewnoakes
Copy link
Member

#6282 eliminates composite dependency IDs altogether.

@drewnoakes drewnoakes removed the Bug label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature-Dependency-Node "Dependencies" node in Solution Explorer that display project, binary & package references Performance-Scenario-Solution-Open This issue affects solution open performance. Tenet-Performance This issue affects the "Performance" tenet. Triage-Approved Reviewed and prioritized
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants