build-perf-baseline

Featured

Establish build performance baselines and apply systematic optimization techniques. Only activate in MSBuild/.NET build context. USE FOR: diagnosing slow builds, establishing before/after measurements (cold, warm, no-op scenarios), applying optimization strategies like MSBuild Server, static graph builds, artifacts output, and dependency graph trimming. Start here before diving into build-perf-diagnostics, incremental-build, or build-parallelism. DO NOT USE FOR: non-MSBuild build systems, detailed bottleneck analysis (use build-perf-diagnostics after baselining).

Web & Frontend 6,272 stars 499 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Build Performance Baseline & Optimization ## Overview Before optimizing a build, you need a **baseline**. Without measurements, optimization is guesswork. This skill covers how to establish baselines and apply systematic optimization techniques. **Related skills:** - `build-perf-diagnostics` — binlog-based bottleneck identification - `incremental-build` — Inputs/Outputs and up-to-date checks - `build-parallelism` — parallel and graph build tuning - `eval-performance` — glob and import chain optimization --- ## Step 1: Establish a Performance Baseline Measure three scenarios to understand where time is spent: ### Cold Build (First Build) No previous build output exists. Measures the full end-to-end time including restore, compilation, and all targets. ```bash # Clean everything first dotnet clean # Remove bin/obj to truly start fresh Get-ChildItem -Recurse -Directory -Include bin,obj | Remove-Item -Recurse -Force # OR on Linux/macOS: # find . -type d \( -name bin -o -name obj \) -exec rm -rf {} + # Measure cold build dotnet build /bl:cold-build.binlog -m ``` ### Warm Build (Incremental Build) Build output exists, some files have changed. Measures how well incremental build works. ```bash # Build once to populate outputs dotnet build -m # Make a small change (touch one .cs file) # Then rebuild dotnet build /bl:warm-build.binlog -m ``` ### No-Op Build (Nothing Changed) Build output exists, nothing has changed. This should be nearly instant. If it's slow, increm...

Details

Author
dotnet
Repository
dotnet/skills
Created
9 months ago
Last Updated
today
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category