groups_of loads every account (accounts(None, u32::MAX)) and reads a membership record for each, members and plain accounts alike. getActor calls it once, and getActorGroups twice (for the caller and for the actor). Each request therefore does work proportional to the whole host, and getActor needs only to know whether one group exists.
How to see it
Read against docs/fresh at 4636e6d, the code at: authorization.rs:68-78 (groups_of); actors.rs:95, :136-138. Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
Look up memberships by member DID (an index of membership records by rkey across groups, or a member → groups table kept on membership writes). Make getActor stop at the first group found.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
groups_ofloads every account (accounts(None, u32::MAX)) and reads a membership record for each, members and plain accounts alike. getActor calls it once, and getActorGroups twice (for the caller and for the actor). Each request therefore does work proportional to the whole host, and getActor needs only to know whether one group exists.How to see it
Read against
docs/freshat 4636e6d, the code at: authorization.rs:68-78 (groups_of); actors.rs:95, :136-138. Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
Look up memberships by member DID (an index of membership records by rkey across groups, or a
member → groupstable kept on membership writes). Make getActor stop at the first group found.Where
The host, as built from 4636e6d. Found while checking the docs against the code.