dqiaw48488 2017-07-09 23:34 采纳率: 0%
浏览 5
已采纳

实例休眠后,Google App Engine是否缓存已编译的go代码?

Google App Engine will put instances to sleep in the Standard Environment, and boot them back up once a new request comes in. I am wondering if my Go code will be compiled again once the instance wakes up or if the compiled code is cached.

If the compiled code is cached, then using the compiler to count the size of an array shouldn't have any impact on the boot time for an instance right?

For instance, would

myCompilerCountedArray := [...]string{"1","2","3"}

and

myUserCountedArray := [3]string{"1","2","3"}

have the same performance when an instance is started after going to sleep?

  • 写回答

1条回答 默认 最新

  • duanqiao0153 2017-07-10 08:49
    关注

    The code is compiled only once, when you deploy the app.

    Quote from the The App Engine Standard Environment doc:

    Your app is automatically re-built on the server side whenever you upload new code, and if you are running the local development server the SDK automatically recompiles sources on-the-fly when you change them.

    Also, the Go Runtime Environment doc states:

    And—as with the Python SDK—your app will be automatically re-built whenever you change the source.

    When an instance is started, app engine only loads and runs the executable binary. This fact doesn't seem to be mentioned in the documentation, but it's indicated by the following known issue:

    Request failed because the app binary was missing

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用C语言输入方程怎么
  • ¥15 网站显示不安全连接问题
  • ¥15 github训练的模型参数无法下载
  • ¥15 51单片机显示器问题
  • ¥20 关于#qt#的问题:Qt代码的移植问题
  • ¥50 求图像处理的matlab方案
  • ¥50 winform中使用edge的Kiosk模式
  • ¥15 关于#python#的问题:功能监听网页
  • ¥15 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题