golang代码重新编绎之后,go build速度慢了很多,怎么破。

763 views
Skip to first unread message

Leither

unread,
Sep 21, 2014, 12:11:06 AM9/21/14
to golang...@googlegroups.com
因为需要跨平台编译,需要根据golang的源码重新编绎一下,但编绎完之后 go build的速度比原来慢了很多,这是什么原因

Brain Wu

unread,
Sep 21, 2014, 5:25:31 AM9/21/14
to golang...@googlegroups.com
交叉编译之后 然后正常的go build就变慢了吗?是这个意思吗?

在 2014年9月21日星期日UTC+8下午12时11分06秒,Leither写道:

Leither

unread,
Sep 21, 2014, 6:09:38 AM9/21/14
to golang...@googlegroups.com
是的,慢的非常多

在 2014年9月21日星期日UTC+8下午5时25分31秒,Brain Wu写道:

Leither

unread,
Sep 21, 2014, 6:14:22 AM9/21/14
to golang...@googlegroups.com
刚测试了一下,原来我的项目go build 只要几秒,感觉不需要时间的,现在要40秒

在 2014年9月21日星期日UTC+8下午5时25分31秒,Brain Wu写道:

mikespook

unread,
Sep 21, 2014, 8:39:41 AM9/21/14
to golang中文组 golang中文组
能大致提供下环境相关的参数吗?

比如如何设置的环境,以及交叉编译的原平台和目标平台等等。

--
--
官网: http://golang-china.org/
IRC: irc.freenode.net #golang-china
@golangchina
---
您收到此邮件是因为您订阅了Google网上论坛中的“Golang-China”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到golang-china...@googlegroups.com
要在网络上查看此讨论,请访问https://groups.google.com/d/msgid/golang-china/22884a52-0dfb-4e1f-98bc-10779cbc65eb%40googlegroups.com
要查看更多选项,请访问https://groups.google.com/d/optout



--
Xing Xing (邢星)
mikespook <mike...@gmail.com>
http://mikespook.com

minux

unread,
Sep 21, 2014, 3:07:14 PM9/21/14
to golang...@googlegroups.com


On Sep 21, 2014 6:09 AM, "Leither" <leigran...@gmail.com> wrote:
> 是的,慢的非常多
go install std
然后再试。

Leither

unread,
Sep 21, 2014, 10:58:46 PM9/21/14
to golang...@googlegroups.com
我运行了go install std
情况没有改变,不知道你是不是让我把系统标准包都安装一下?
另外,我刚在主应用目录运行了一下go install,速度马上快了,不知道你是不是这个意思?

问题好象已经解决了。

在 2014年9月22日星期一UTC+8上午3时07分14秒,minux写道:
Reply all
Reply to author
Forward
0 new messages