in our case all sr groups are visible and all options are default, so we do not need to make so much queries to database. original code is too slow
Merge pull request #3 from vesvalo/master

in our case all sr groups are visible and all options are default