Why is PowerShell 3 and newer 5x slower than Power Shell at start-up? ISE

%3CLINGO-SUB%20id%3D%22lingo-sub-1547707%22%20slang%3D%22en-US%22%3EWhy%20is%20PowerShell%203%20and%20newer%205x%20slower%20than%20Power%20Shell%20at%20start-up%3F%20ISE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1547707%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20discovered%20Power%20Shell%20ISE%20not%20long%20time%20ago.%20I%20like%20it%20a%20lot%2C%20but%20there%20is%20one%20thing%20that%20is%20concerning%20me.%20After%20downloading%20the%20newer%20versions%20(3%20and%204)%2C%20I%20discovered%20when%20launching%20the%20ISE%20software%20it%20takes%205x%20more%20time%20to%20launch.%20Basically%20it%20took%20just%201%20second%20to%20launch%20PowerShell%201%20ISE%20and%20now%20PowerShell%203%20ISE%20takes%205%20seconds.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEven%20when%20I%20tried%20ISE%20on%20my%208%20core%20machine%2C%20it%20still%20took%203%20seconds%20to%20start.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExcept%20the%20auto-fill%20feature%2C%20everthing%20in%20Power%20Shell%203%20feels%20the%20same.%3C%2FP%3E%3CP%3EMy%20question%20is%20why%20it%20takes%20so%20much%20long%20to%20start%3F%20It%60s%20a%20little%20painfull%20to%20watch%20the%20same%20software%20taking%20so%20much%20long%20time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20very%20curious%20about%20that.%20Hopefully%20someone%20might%20help%20me%20out%20here.%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1547707%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerShell%20ISE%203%20vs%201%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1705753%22%20slang%3D%22en-US%22%3ERe%3A%20Why%20is%20PowerShell%203%20and%20newer%205x%20slower%20than%20Power%20Shell%20at%20start-up%3F%20ISE%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1705753%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F740993%22%20target%3D%22_blank%22%3E%40PeterSen20%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EMy%20guess%20would%20be%20-%20because%20of%20modules%20auto-load.%3C%2FP%3E%3CP%3EBeginning%20in%20PowerShell%203.0%2C%20PowerShell%20imports%20modules%20automatically%20from%20location%20specified%20by%20the%20%3CSTRONG%3EPSModulePath%3C%2FSTRONG%3E%20environment%20variable.%3C%2FP%3E%3CP%3EReference%3A%20%3CA%20href%3D%22https%3A%2F%2Fpowershell.org%2Fforums%2Ftopic%2Fwhich-is-best-method-to-authenticate-the-remote-machine%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eabout_modules%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello,

 

I have discovered Power Shell ISE not long time ago. I like it a lot, but there is one thing that is concerning me. After downloading the newer versions (3 and 4), I discovered when launching the ISE software it takes 5x more time to launch. Basically it took just 1 second to launch PowerShell 1 ISE and now PowerShell 3 ISE takes 5 seconds.

 

Even when I tried ISE on my 8 core machine, it still took 3 seconds to start.

 

Except the auto-fill feature, everthing in Power Shell 3 feels the same.

My question is why it takes so much long to start? It`s a little painfull to watch the same software taking so much long time.

 

I am very curious about that. Hopefully someone might help me out here.

Thanks.

 

1 Reply

Hello @PeterSen20,

My guess would be - because of modules auto-load.

Beginning in PowerShell 3.0, PowerShell imports modules automatically from location specified by the PSModulePath environment variable.

Reference: about_modules

 

Hope that helps.