-
-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: powershell optimisation (ngen) rewrites
- Loading branch information
Showing
3 changed files
with
8 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
# speeds up powershell startup time by 10x | ||
$env:path = $env:path + ";" + $([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) | ||
[AppDomain]::CurrentDomain.GetAssemblies() | % { | ||
if (! $_.location) {continue} | ||
$Name = Split-Path $_.location -leaf | ||
Write-Host -ForegroundColor Yellow "NGENing : $Name" | ||
ngen install $_.location | % {"`t$_"} | Out-Null | ||
} | ||
|
||
# run these tasks in the background to make sure that it is all ngened | ||
& schtasks.exe /Run /TN "\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319" | ||
& schtasks.exe /Run /TN "\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64" | ||
$env:path = "$([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory());" + $env:path | ||
[AppDomain]::CurrentDomain.GetAssemblies().Location | ? {$_} | % { | ||
Write-Host "NGENing: $(Split-Path $_ -Leaf)" -ForegroundColor Yellow | ||
ngen install $_ | Out-Null | ||
} |