Three seconds for a shell is not quick.
I found some pages related to running an ngen command, and it has cut the time to around 0.8 seconds, but that's still far too slow.
CMD and BAT files are almost instant.
Update...
I just created the following: code: ECHO %TIME% before PS
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe weee.ps1
ECHO %TIME% after PS
ECHO %TIME% before BAT
CALL weee.bat
ECHO %TIME% after BAT
ECHO %TIME% before BAT2
START /WAIT weee2.bat
ECHO %TIME% after BAT2
(the weee.ps1 and weee.bat both contain ECHO "Weee" the weee2.bat also contains an EXIT command.)
PS takes between 75ms and 85ms to run every time.
First BAT runs with no time difference at all (doesn't wait?).
Second BAT runs on average in 6ms (varies from 4ms to 7ms) |