Comment 4 for bug 246200

Revision history for this message
James Henstridge (jamesh) wrote : Re: Archive index pages timeout because of inefficient storm.sqlobject __nonzero__

We should definitely improve the SQLObjectResultSet.__nonzero__ implementation.

That said, if __nonzero__() returns True, do you go ahead and repeat the full query? If so, then it'd be better to restructure your page to just go ahead and do the query once and handle zero rows case appropriately.

There is no __nonzero__() in the native Storm ResultSet class as its use usually involves repeating queries for no good reason.