dotnet / dotnet/project-system
Inefficient way to create the first version of the dependencies tree after loading a project
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
GroupedByTargetTreeViewProvider.BuildSubTreesAsync will create nodes by nodes and insert them to the tree. It turns out to be a very inefficient way to create the immutable tree. When the code add one item, the entire spine will need be replaced (also it remembers the each change in the history record). The main project tree in CPS has been written to create it from bottom-up. (Creating leaf nodes first then folders with existing children nodes). This will reduce lots of CPU/memory overhead. The later sequence still has to update node by node because of the limitation of the current data structure, but usually, it will do much less change after first iteration.
Contributor guide
Assessment
This issue has not been assessed yet.