Repository navigation
Reduce strong-fingerprint memory retention - #182
Pawel (92pawelostrowski) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
@microsoft-github-policy-service agree company="WiseTech Global" |
|
Based on your results, it looks like performance is regressed, so this change wouldn't be acceptable as-is. There are likely other low-hanging fruit though for memory usage. |
|
Hi David Federman (@dfederm), thanks for taking a look at this. My initial testing focused on memory. The build-time differences may have been normal fluctuation or other resource usage. I was doing other work on my laptop while those tests were running. Here is a larger sample: 500-project-results.md. It contains 48 completed builds across three batches, using 500 projects, 2 and 15 MSBuild workers, and cold and warm caches. Comparing Local with Official, using arithmetic means across the recorded runs:
Memory savings were consistent across batches, ranging from 15.6% to 17.9%. Warm build-time differences went both ways, from 1.6% less to 3.0% more. I wouldn't jump to the conclusion that there is a build-time regression based on these results. The timing differences vary between batches and could reflect normal fluctuation. |
The strong-fingerprint cache holds
PathSetobjects and expanded fingerprint entries for the factory's lifetime. UseConditionalWeakTablewith lazy tasks so completed entries can be collected and concurrent callers still share a calculation.Fingerprint hashes and the description-hash cache stay unchanged. Equivalent but separate
PathSetobjects may now recompute.Includes regression tests for collection, hash compatibility, concurrency and asynchronous publication. Runtime comparisons use Pawel.MSBuildCacheTesting, a 500-project workload with large strong fingerprints.
Runtime results: #183.
Validation: Release build passed; all 582 unit tests passed (
net472andnet9.0).