dotnet / dotnet/msbuild

[Performance]: Remove per-condition serialization in ConditionEvaluator under -mt

Open
#14,839 1 comment 0 reactions 0 assignees View on GitHub
Area: Evaluation Area: Multithreaded Area: Performance Priority:3 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Problem

Under `-mt`, `ConditionEvaluator` holds the per-condition expression-pool lock while evaluating, serializing identical imported conditions across projects.

### Proposed work

Narrow the `Stack` lock to pop/push, cap retained pool depth, add a parallel benchmark, and validate with same-base OrchardCore `-mt` measurements. Prototype: `origin/perf/AR-May/fix-condition-evaluation-in-mt`.

An 8-worker stress test improved condition throughput by 36–75%; end-to-end build gain is not yet measured.

Related: #14020, #12151.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating ConditionEvaluator and its per-condition expression-pool Stack, then inspect how the lock surrounds evaluation under -mt. Add the proposed parallel benchmark and compare same-base OrchardCore -mt measurements; done means lock scope is narrowed, pool depth is capped, and condition throughput and end-to-end effects are measured.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.