Open amschaal opened 8 years ago
Try to use prefetch_related to get the users and groups that have permission for a Share. Currently, each share queries both individually. That makes at least 2 queries for every share listed.
This stack overflow may be of help: http://stackoverflow.com/questions/28127135/is-django-prefetch-related-supposed-to-work-with-genericrelation
Try to use prefetch_related to get the users and groups that have permission for a Share. Currently, each share queries both individually. That makes at least 2 queries for every share listed.
This stack overflow may be of help: http://stackoverflow.com/questions/28127135/is-django-prefetch-related-supposed-to-work-with-genericrelation