Google App Engine DB Query Memory Usage

左心房为你撑大大i 提交于 2019-11-29 15:33:42

Each model entity has some over head.

You query returns objects as Protobufs for starters.

So you will a series of batched protobufs for the result set.

Then it is decoded. Each decoded entity includes the property names as well as the data for each entity. You have 15K entities. How big are your property names for instance.

So you have at least two copies of the result set in memory in various forms (possibly more), not including anything else you do with instances of the model class.

You code/loop has no opportunity for garbage collections, and that can/will happen later.

Have a look at tools like apptrace to help memory profiling.

I have reported this to the app engine team, and they seem to confirm this is actually a problem (suspected to be with the handling of cursors).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!