Appengine优化 [英] Appengine Optimizations

查看:144
本文介绍了Appengine优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能让我的Google AppEngine应用程序的请求执行得更好更快(即加载时间更少,CPU使用率更少)?我特别指的是应用程序的服务器端部分,而不是客户端。 使用解决方案

使用appengine Appstats来查看你的应用程序实际上在哪里使用更多的cpu资源。试图找出原因并寻找替代解决方案。
在python中,你可以做很多优化。 M


  1. 使用memcache api可以轻松快速地获取
    数据。避免
    不必要的获取()和get()。
    避免在使用db.reference()属性的
    时执行大量的RPC。
    尼克的博客对此进行了解释。

  2. 在appengine中的建模在性能方面很重要。确保您有适合您应用程序的正确模型。

  3. 避免进行获取和获取,除非您真的需要它们。



How can I get the requests of my Google AppEngine application to perform better and faster (i.e. less load times and less CPU usage)? I'm specifically referring to imporvements for the server-side portion of the app, and not the client-side.

解决方案

Use appengine Appstats to see where actually your application uses more cpu resources.Try to find out the reason for that and look for alternative solution. In python you can do lot of optimisation. M

  1. Make use of memcache api which makes data fetch easy and fast. Avoid unnecessary fetch() and get().

  2. Avoid doing a lot of RPCs while using db.reference() property. Nick's blog on this explains about this.

  3. Modeling in appengine matters a lot in performance. Make sure you have the right model designed for your application.

  4. Avoid doing get and fetch unless until you really need them.

这篇关于Appengine优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆