duanqinqian5299 2017-10-23 02:58
浏览 19

降级go编译器后编译速度变慢

I recently got upgraded from Go 1.8.4 to 1.9 without knowing it. Compilation speed wasn't affect (not noticed at least). But I had problem with tools like guru, so I uninstalled 1.9 and re-installed 1.8.4. Afterwards, go run foo.go becomes pretty slow. I'm suspecting that the older version of the compiler cannot use cache from 1.9 and had to recompile everything from scratch - I have no prove.

Is my suspicion correct? If so, is there a way I can reset the compiler cache?

  • 写回答

1条回答 默认 最新

  • dongmeng2509 2017-10-23 05:52
    关注

    Delete the folder $GOPATH\pkg. That is the package cache folder.

    If you run the compiler with the -v flag it will list all the packages being compiled. If it keeps compiling the same packages that you have not changed then you know it is not using the cache.

    In the past I have found that when compiling code with run/build the compiler does not cache packages, but it does cache them when using install.

    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测