dotnet / dotnet/msbuild

Lookup/ItemDictionary make up a huge amount of allocations/CPU item

Open
#2,587 10 comments 0 reactions 0 assignees View on GitHub
Area: Performance backlog Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

What's happening is that the initial capability/current capability is not correct, and we're resizing the underlying items dictionary, possible multiple times with the same ImportItems call.

![image](https://user-images.githubusercontent.com/1103906/31216769-78ac158c-aa00-11e7-80f4-be86bf869cdf.png)

Not sure of a good way to fix this - there's no way to resize a dictionary after it's created.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting Lookup/ItemDictionary and the ImportItems path described in the issue, then reproduce the allocation and CPU behavior with profiling. Done means the initial and current capabilities are correct and repeated resizing of the underlying items dictionary during one ImportItems call is avoided.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.