Closed amoldeshpande closed 3 years ago
Well I don’t think the static build will do anything unless the go linker explicitly links with all the Windows import libraries it needs. Static builds are meaningless in windows except for the c library, which i assume go doesn’t need anyway.
A normal, well behaved windows application will link with system import libs for kernel32 user32 advapi32 ws2_32 etc. when such an application starts, the NT loader will in current versions load the DLLS for these in parallel.
what go did the last time I looked at it, was that in a stupid overkill aim to only ship an exe (again, static is meaningless in windows), they didn’t link with any system libs and instead serially loaded each one at startup.
maybe it has changed, but only a WPT profile will tell
The slow load times I was experiencing turned out to be MS Defender ATP in the end. for whatever reason it was causing some intensive scanning. After we reported this to MS Support the following day we saw Defender ATP no longer was blatting it and the prompt profile came up in the expected time.
All back to normal now.
@apapiccio Thank you for reporting this to Microsoft! So it turns out for me the culprit was also Defender ATP as today, it is behaving normally again! ❤
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Prerequisites
CONTRIBUTING
guideDescription
Slowness in rendering prompt. It's noticeably slow in Windows compared to WSL2, even in the same Terminal.
Environment
Steps to Reproduce
I was trying to figure out why composing the prompt is so slow on windows. I unfortunately don't know much go, but I muddled around with it and found a couple of things.
Firstly, running and parsing git commands seems quite slow.
As you can see here, running the raw git command takes less than half the time it takes to run a posh command where my only config is a git segment (the default one from your theme file)
There is no git repo in that directory (I was trying to get the fastest execution for the git segment, but interestingly the overall execution time of posh does not change even within a git repo)
I tried to do some profiling in go, and came up with this for execution:
I'm always running
where the theme only contains a only git prompt segment exactly like the jandedobbeleer profile
In a repo with git, this is the profile
So, it seems that running multiple git commands slows things down even more , as you'd expect.
With my less-than-zero knowledge of go, I can only theorize that
Love the tool, thanks for the great work !