AppEngine Query.fetch_async not very asynchronous?

后端 未结 2 1559
温柔的废话
温柔的废话 2020-12-09 06:57

I\'m trying to reduce the execution time of an AppEngine query by running multiple sub-queries asynchronously, using query.fetch_async(). However, it seems that the gain is

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-09 07:31

    Are you always running run_parallel before run_serial? If so ndb caches the results and is able to pull the information much faster. Try flipping the results or even better try with DB, as ndb is just a wrapper to include memcache results.

提交回复
热议问题