Skip to content

gorm command is slow in WSL2 #44

@paul-marechal

Description

@paul-marechal

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

$ 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:

$ 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions