Comment 21 for bug 590708

Revision history for this message
Leonard Richardson (leonardr) wrote :

I don't know why I took so long to realize this, but here it is. Getting rid of total_size for certain named operations won't stop the query from being run, for exactly the reasons I outlined above: that query is run as soon as the _Batch object is created. So the first step to any kind of optimization is to get a _Batch-like object that doesn't need to know the total size of the collection unless you explicitly ask for it.

I can implement include_total_size and it will work fine, but it won't have any effect on performance unless we solve this other problem.