Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import-Modules in parallel when session profile loaded? #60

Open
Praful opened this issue Feb 10, 2019 · 1 comment
Open

Import-Modules in parallel when session profile loaded? #60

Praful opened this issue Feb 10, 2019 · 1 comment

Comments

@Praful
Copy link

Praful commented Feb 10, 2019

Hello

I've noticed that as I've added modules to my $PROFILE script, the startup time to open a PS terminal has increased. PsFZF, in particular is slow and the author knows this.

I import three modules in my $PROFILE:

Import-Module PSFzf -ArgumentList 'Ctrl+t','Ctrl+r'
Import-Module posh-git
Import-Module oh-my-posh

Is there a way to use Invoke-Parallel (or something else) to load these in parallel to speed up terminal start time?

Thanks

@vors
Copy link
Collaborator

vors commented Feb 10, 2019

I doubt that it would help, Invoke-Parallel has an overhead of it's own of about 0.5 sec per job. Also you would likely see problems with marshaling all the imports from invoke-parrallel scopes back to the global scope.

I personally found posh-git the main offender and don't use it because of the bad performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants