Speed up the tag index page
Excluding spam projects from the tag index page really slows it down.
This involves a project-project self join and then joining against
users and the user profile. Each of these tables is a few 100k records.
@@ -54,7 +54,6 @@ class ProjectTagIndex(ListView):
def get_queryset(self):
queryset = Project.objects.public(self.request.user)
- queryset = queryset.exclude(users__profile__banned=True)
self.tag = get_object_or_404(Tag, slug=self.kwargs.get('tag'))
queryset = queryset.filter(tags__slug__in=[self.tag.slug])
