The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
bli22ard

go run main.go 特别慢

  •  
  •   bli22ard · Jun 26, 2025 · 4060 views
    This topic created in 502 days ago, the information mentioned may be changed or developed.

    升级 go version go1.24.4 windows/amd64 后

    运行

    go run main.go
    

    特别慢,每次都要 1-2 分钟,之前几十秒

    15 replies  •  2025-06-27 14:49:44 +08:00
    TypeErrorNone
    TypeErrorNone
    Jun 26, 2025
    1
    得换机器了老铁
    lrh3321
    lrh3321
    Jun 26, 2025
    2
    有没有可能是你的 windows defender 在扫描?
    niubilewodev
    niubilewodev
    Jun 26, 2025 via iPhone
    3
    看看你的杀毒软件。
    akiyamamio
    akiyamamio
    Jun 26, 2025
    4
    windows defender 关了,换火绒
    Windows PC Manager 关了,电脑卡顿 90%的概率是这个导致的
    Curtion
    Curtion
    Jun 26, 2025 via iPhone
    5
    https://v2ex.com/t/1140144 看这个,我今天也遇见了,不止慢,还导致整个电脑变卡
    skiy
    skiy
    Jun 26, 2025
    6
    把你代码放到云端跑一跑看看,到底是 windows 平台问题,还是你代码的问题。
    bli22ard
    bli22ard
    OP
    Jun 26, 2025 via iPhone
    7
    @Curtion 我用的火绒,我退出火绒也一样,真的奇怪了
    crackidz
    crackidz
    Jun 26, 2025
    8
    Windows 的话一般是杀毒软件问题,不用怀疑,卸载了之后对比一下速度即可
    wogogoing
    wogogoing
    Jun 26, 2025 via iPhone
    9
    我试过了 ubuntu 、deepin 、macOS 都不卡,就 Windows 卡的飞起
    MIUIOS
    MIUIOS
    Jun 26, 2025
    10
    关闭所有杀毒,包括微软自带的,可以下一个火绒,然后把实时杀毒关了,这样又能屏蔽自带的又不会卡
    zh3256
    zh3256
    Jun 26, 2025 via Android
    11
    加上-x 参数看看卡在哪里
    user1284
    user1284
    Jun 27, 2025❤️1
    12
    less is more, slow is fast
    bli22ard
    bli22ard
    OP
    Jun 27, 2025
    13
    @z1829909 加了, 看不出什么。
    homewORK
    homewORK
    Jun 27, 2025
    14
    我也是如此, 后面都是 go build 后再运行了。我之前怀疑是因为 go run 他将编译后的临时文件存储在了 C 盘导致扫描等问题,不过 没验证。
    vvhy
    vvhy
    Jun 27, 2025 via Android
    15
    有个 gotmpdir 环境变量,试试设在当前文件夹
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3708 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 09:56 · PVG 17:56 · LAX 01:56 · JFK 04:56
    ♥ Do have faith in what you're doing.