Giter Club home page Giter Club logo

Comments (21)

JayBazuzi avatar JayBazuzi commented on May 31, 2024

If you open plain PowerShell on each machine (not Git Shell), how long do they take?

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

I don't know exactly how GH4W loads posh-git, but to test posh-git in isolation you can put something like this in your regular $PROFILE:

 # Load GH4W environment
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")

$posh_git_sw = [Diagnostics.Stopwatch]::StartNew()
. (Resolve-Path "$env:github_posh_git\profile.example.ps1")
$posh_git_sw.Stop()
Write-Host $posh_git_sw.Elapsed

from posh-git.

SenWang avatar SenWang commented on May 31, 2024

@JayBazuzi In all 3 PCs, plain PS started almost instantly, no delay

from posh-git.

SenWang avatar SenWang commented on May 31, 2024

@dahlbyk Hi, I got the result - 00:00:25.8699886 ....

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

00:00:25.8699886

Well then...you're right to object to that. 😊 I've never seen anything close to that before, but I'll see if I can add some instrumentation to help figure out what's taking so long.

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

Could you please try this branch (in your normal PowerShell, not GitHub Shell):
https://github.com/dahlbyk/posh-git/tree/ImportDebug

Beyond the standard install, just add $posh_git_import_debug = $true before profile.example.ps1 is loaded.

from posh-git.

SenWang avatar SenWang commented on May 31, 2024

Hi @dahlbyk ,
I've tried to replace posh-git under $env:LOCALAPPDATA\GitHub ( rename PoshGit_e0fc5e56ff55708a890f408f03656f758fa0ba8a to PoshGit_e0fc5e56ff55708a890f408f03656f758fa0ba8a_old) for testing the branch, something amazing.
System delete the PoshGit_e0fc5e56ff55708a890f408f03656f758fa0ba8a_old folder and create a whole new PoshGit_e0fc5e56ff55708a890f408f03656f758fa0ba8a folder. And then, the startup time became normal as before.
I don't know why....

from posh-git.

SenWang avatar SenWang commented on May 31, 2024

In my opinion, maybe GitHub.exe changed something under PoshGit forder is the root cause of my problem. I'm sorry I can't reproduce it because the original folder got lost :)

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

I assume the folder was replaced as some sort of ClickOnce security feature.

the startup time became normal as before

Normal as in a few seconds instead of 25?

In my opinion, maybe GitHub.exe changed something under PoshGit forder is the root cause of my problem. I'm sorry I can't reproduce it because the original folder got lost :)

To rule that out you could clone and install your own copy of posh-git (into C:\Temp or whatever):

git clone https://github.com/dahlbyk/posh-git.git -b ImportDebug
cd posh-git
.\Install.ps1
. $PROFILE

I know GH4W has its own tricks around authentication...not sure what else it could be. /cc @haacked

from posh-git.

SenWang avatar SenWang commented on May 31, 2024

@dahlbyk Yes, after system rollback the post-git flder, the startup time is 00:00:01.4389930

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

Fascinating. Well, I'm going to close this for now...let me know if it comes back.

from posh-git.

racingcow avatar racingcow commented on May 31, 2024

I am running version 1.0.41.2 on Windows 8, and just had the same issue as SenWang. The actual shell window would open immediately, but it just sits there with the lines...

Windows PowerShell
Copyright (C) 2012 Microsoft Corporation. All rights reserved.

..for a very long time. You don't see the "MyFolder\x\y [master]>" prompt until after the long pause.

Just like in SenWang's case, renaming the %LOCALAPPDATA%\GitHub\PostGit_XXX folder to PostGit_XXX_old and restarting GitHub for Windows seems to resolve the issue.

from posh-git.

hmemcpy avatar hmemcpy commented on May 31, 2024

Hey, sorry to bump this closed issue, but I'm having the same problem - PowerShell takes really long time to start (about 25 seconds). I tried replacing my posh-git install with the ImportDebug branch, didn't help.

Any ideas?
I'm using "regular" git installation from Chocolatey (cinst git).

from posh-git.

farzher avatar farzher commented on May 31, 2024

I'm having the same problem, takes about 25 seconds for this thing to start up /:

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

I tried replacing my posh-git install with the ImportDebug branch, didn't help.

What do you mean by "didn't help"? Make sure you set $posh_git_import_debug = $true before profile.example.ps1 is loaded...

I would expect additional output that looks something like this:

VERBOSE: 00007:Loading posh-git...
VERBOSE: 00013:CheckVersion.ps1 ...
VERBOSE: 00066:Utils.ps1 ...
VERBOSE: 00073:GitUtils.ps1 ...
VERBOSE: 00079:GitPrompt.ps1 ...
VERBOSE: 00106:GitTabExpansion.ps1 ...
VERBOSE: 00190:TortoiseGit.ps1 ...
VERBOSE: 00239:posh-git Loaded!

from posh-git.

hmemcpy avatar hmemcpy commented on May 31, 2024

Ah, I didn't know, since I assumed the debug branch would contain the "debug" scripts...

Eiter way, today I completely removed all traces of posh-git (including the entries in Microsoft.PowerShell_profile.ps1) and cloned it from source. This solved the problem for me!

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

Ah, I didn't know, since I assumed the debug branch would contain the "debug" scripts...

I had set it up disabled by default with the thought that I might eventually merge the change into master to facilitate others' debugging, but you're right that until then it's silly that the branch doesn't turn on debugging.

Eiter way, today I completely removed all traces of posh-git (including the entries in Microsoft.PowerShell_profile.ps1) and cloned it from source. This solved the problem for me!

But now if it's fixed how can we figure out what was wrong?! ;)

For those still experiencing issues, another thing to check is what you see in $Errors - if a bunch of stuff is failing (no idea what), that could bring things to a crawl.

from posh-git.

Ardakilic avatar Ardakilic commented on May 31, 2024

I had to wait ~5 minutes before the Shell becomes available for usage in Win8 x64,

Just like in SenWang's case, renaming the %LOCALAPPDATA%\GitHub\PostGit_XXX folder to PostGit_XXX_old and restarting GitHub for Windows seems to resolve the issue.

This fixed my issue.

from posh-git.

dahlbyk avatar dahlbyk commented on May 31, 2024

You shouldn't need to rename PoshGit_XXX:

  1. Open GH4W
  2. Select tools > check for updates...

from posh-git.

SenWang avatar SenWang commented on May 31, 2024

YES, this issue had been solved since last update :)

from posh-git.

Ardakilic avatar Ardakilic commented on May 31, 2024

Thanks for the information, I thought it auto-checks for the update. So
far, everything is great. Cheers!

On Thu, Jun 27, 2013 at 2:29 AM, SenWang [email protected] wrote:

YES, this issue had been solved since last update :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/82#issuecomment-20087587
.

Arda
PHP Fusion Türkiye Resmi Destek Sitesi PHPFusionturkiye.com Yöneticisi
(PHP Fusion Official Turkish Support Site Administrator)

PHP-Fusion International Management, Crew and Development Team Member

from posh-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.