Having to loop over each group and call members.list() is expensive: https://developers.google.com/workspace/admin/directory/reference/rest/v1/members/list
I have parallelized these calls, but I want to make sure there isn't a builtin feature I should be using instead.
It appears under the scenes group memberships are stored in a separate "table" instead of being attached to group objects directly so maybe this is impossible.
There isn't a "return a mapping of all groups and their members and do it quickly" method is there?
OR if "members" are stored separately is there a method to just list ALL membership irrespective of the group they belong to?