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