justquick/django-activity-stream — Issue #52: select_related doesn't work on GenericForeignKey fields
Author: dgouldin
Created: 2011-12-07 02:10:26+00:00
State: open

https://github.com/justquick/django-activity-stream/blob/master/actstream/managers.py#L67

'actor' will never be successfully selected in the queryset, and each time follow.actor is checked in the resulting for loop will execute 2 queries. For a large stream, the performance impact of 2n+1 is pretty massive.