jsocol/django-waffle — pull request #66 by gorillamania (2012-12-01 00:06:37+00:00)
Title: Use only 1 sql statement for group instead of one per flag_group

Hi,

This reduces the number of sql statements generated by waffle signifigantly in my environment, where we have a lot of groups. Instead of dozens of these sql statements for every request:

SELECT `auth_user`.`id`, `auth_user`.`username`, `auth_user`.`first_name`, `auth_user`.`last_name`, `auth_user`.`email`, `auth_user`.`password`, `auth_user`.`is_staff`, `auth_user`.`is_active`, `auth_user`.`is_superuser`, `auth_user`.`last_login`, `auth_user`.`date_joined` FROM `auth_user` WHERE `auth_user`.`id` = %s (23,)

This commit makes it 1.