Skip to content

Commit 8b14379

Browse files
committed
reintroduce higher parallelism
1 parent bae4c9b commit 8b14379

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/GenerateModules.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ $AutoRestTempFolder | ForEach-Object {
9292
}
9393

9494
$Stopwatch = [system.diagnostics.stopwatch]::StartNew()
95-
$Throttle = 2 # Reduced from 4 to prevent file locking issues in parallel module generation
95+
$CpuCount = (Get-CimInstance Win32_Processor).NumberOfLogicalProcessors
96+
$Throttle = [math]::Min(4, $cpuCount / 2) # Use half the CPU count but max 4
9697
$Results = $ModuleToGenerate | ForEach-Object -Parallel {
9798
$Module = $_
9899
Write-Host -ForegroundColor Green "-------------'Generating $Module'-------------"

0 commit comments

Comments
 (0)