﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24190	"""Don’t use len() on QuerySets"" is too strong."	Collin Anderson	nobody	"I've seen people write code like:
{{{
qs = Model.objects.filter(a=b)
if qs.count() >= 1:
    for q in qs:
        # do something with q
}}}
They think the that "".count()"" call is more efficient, but it actually makes it slower. I asked the person about it they said: ""the docs say don't use len() on querysets"".
"	Cleanup/optimization	closed	Documentation	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
