Search code examples
profilingdjango-nonreldjangoappengine

Profile python in google app engine sdk (djangoappengine)


I am developing a dDango app (djangoappengine) using the Google App Engine SDK. My app is painfully slow and I want to profile it. I have tried cProfile, profile, and hotshot according to

https://code.djangoproject.com/wiki/ProfilingDjango

However, due to (I think) Google's limited offering of pre-installed python-libs. all tries result in some ImpportError. That is, cProfile, profile etc. are installed on the computer, but not "usable" when running my app using the GAE SDK.

I have tried symlinking cProfile directly into my app (as if I had written it myself), but that only brings other problems.

Is there a real way to profile a djangoappengine app without too much hassle?

Thank you


Solution

  • The symlinking route is the way to go.

    You can use AppStats for profiling App Engine API calls.

    https://developers.google.com/appengine/docs/python/tools/appstats

    This is generally useful, since generally the bottlenecks will be on datastore requests etc. This won't help you if you have your own compute intensive loops to profile.