go-gorm / go-gorm/cli

`gorm` command is slow in WSL2

Open
#44 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
108
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Simply running `gorm` after running `go install gorm.io/cli/gorm@latest`, see:

```bash
$ time gorm
// ...
real 0m3.315s
user 0m8.618s
sys 0m1.401s
```

I ran `strace` and what I see is `gorm` frantically looking for some `gopackagesdriver` file, issue is I don't understand what it is or where I should get it.

I just tried emptying my `PATH` to skip the lookup and it's 100% the cause:

```bash
$ time PATH="" /path/to/gorm-cli
// ...
real 0m0.011s
user 0m0.000s
sys 0m0.011s
```

By default my WSL2 `PATH` contains some paths to the Windows host (through `/mnt/c/...`) and I'm suspecting that accessing these is very costly.

What is it that it's searching?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.