Consider getting rid of the SpaceMembership table
Summary: This is one of the "fattest" tables in the system, being Identity x Spaces. Can we get rid of it in the new world?
AFAIK, this table is used for two purposes:
- Listing my Collaborators when doing invitations.
- Listing
Spaces You are a Member of
in the Index page.
Are there any other purposes? Could we replace this with something a bit denormalized, such as a Persistent Actor that contains this list, and maybe gather the Collaborators with a map/reduce operation? That might be more efficient. The implication would be that each Space would need a separate Persistent Actor (not in the troupe), that simply contained the Membership list; this could be more easily map/reduced over.
One major potential snag if we were to denormalize: it becomes much harder to filter the list for Spaces that are Archived / Deleted. Doing this in a principled way might be tricky.