remotemobprogramming / mob

Tool for smooth git handover.
https://mob.sh
MIT License
1.66k stars 149 forks source link

Use os.UserHomeDir() instead of user.Current() HomeDir to improve Windows performance #423

Closed jmbockhorst closed 4 months ago

jmbockhorst commented 4 months ago

On Windows, I am seeing long command times (10+ seconds) when running mob. I was able to narrow it down to the user.Current() call. I assume it takes a long time because my Windows user is managed by an organization domain controller. Switching to os.UserHomeDir() fixes this performance problem and user.Current() uses that under the hood anyways: https://github.com/golang/go/blob/974b2011ca2a74ca1137558771b428bddb2e7df3/src/os/user/lookup_stubs.go#L32.

hollesse commented 4 months ago

Hi @jmbockhorst thank you for your contribution. I appreciate it :) If you like please join our new community at http://slack.mob.sh