Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance get_content() by omitting the version_membership lookup
>>> timeit.timeit("len(v.get_content(Package.objects).only('pk'))", globals=globals(), number=10) 105.0813707895577 >>> timeit.timeit("len(v.get_content2(Package.objects).only('pk'))", globals=globals(), number=10) 58.41291802749038 >>> timeit.timeit("v.get_content(Package.objects).count()", globals=globals(), number=10) 62.557361379265785 >>> timeit.timeit("v.get_content2(Package.objects).count()", globals=globals(), number=10) 16.70007463544607 Credits to @newswangerd. closes #3969
- Loading branch information