Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Faster dotSource implementation for parsing autoload tab-complete
This[1] blog post describes a faster method of importing use script into the powershell session by loading the file contents into memory proir to letting powershell parse them for auto-complete values. Reference: 1: https://becomelotr.wordpress.com/2017/02/13/expensive-dot-sourcing/ Testing: Test cmderdev#1 --- dotsource(ms) | scriptblock(ms) | filename(test data) --- | --- | --- 18 | 13 | Approve-Script.ps1 6 | 2 | Clear-PrinterQueue.ps1 14 | 3 | ConvertTo-ImageFormat.ps1 9 | 2 | Copy-MultipleItems.ps1 6 | 2 | Enter-RemoteSession.ps1 6 | 3 | Get-CurrentUser.ps1 7 | 3 | Get-LogonHistory.ps1 6 | 2 | Get-SSID.ps1 6 | 2 | Invoke-DscPullAndApply.ps1 8 | 3 | Move-Drive.ps1 7 | 2 | New-ComputerList.ps1 6 | 2 | New-Directory.ps1 6 | 3 | Set-Proxy.ps1 7 | 2 | Shortcut.ps1 6 | 3 | Start-Delprof.ps1 6 | 3 | Suspend-Computer.ps1 9 | 4 | SystemInformation.ps1 6 | 3 | Test-ModuleSpeed.ps1 7 | 5 | Test-TCPConnection.ps1 6 | 2 | Update-ModuleReadMe.ps1 11 | 3 | Watch-Here.ps1 Test cmderdev#2 --- dotsource(ms) | scriptblock(ms) | filename(test data) --- | --- | --- 40 | 24 | Approve-Script.ps1 8 | 4 | Clear-PrinterQueue.ps1 24 | 12 | ConvertTo-ImageFormat.ps1 14 | 8 | Copy-MultipleItems.ps1 7 | 4 | Enter-RemoteSession.ps1 10 | 4 | Get-CurrentUser.ps1 30 | 6 | Get-LogonHistory.ps1 6 | 4 | Get-SSID.ps1 7 | 4 | Invoke-DscPullAndApply.ps1 11 | 8 | Move-Drive.ps1 11 | 5 | New-ComputerList.ps1 11 | 4 | New-Directory.ps1 6 | 5 | Set-Proxy.ps1 11 | 5 | Shortcut.ps1 10 | 12 | Start-Delprof.ps1 12 | 5 | Suspend-Computer.ps1 69 | 5 | SystemInformation.ps1 11 | 4 | Test-ModuleSpeed.ps1 6 | 7 | Test-TCPConnection.ps1 8 | 4 | Update-ModuleReadMe.ps1 10 | 9 | Watch-Here.ps1
- Loading branch information