Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spectated communities are never closed #20594

Open
ilmotta opened this issue Jun 27, 2024 · 0 comments
Open

Spectated communities are never closed #20594

ilmotta opened this issue Jun 27, 2024 · 0 comments

Comments

@ilmotta
Copy link
Contributor

ilmotta commented Jun 27, 2024

Problem

When a user opens a community but never joins it, the community stays in the spectated state and accessible in the Opened tab in the home screen, forever, even after logout. Each spectated community will eat considerable resources, much like a community the user has joined. This is a form of resource leak.

The main performance cost here for the mobile app comes from the overhead of keeping the state in sync as signals arrive for a community (esp. a large one), given that we globally process signals independently of the current screen the user is at.

Original discussion in #20508 (comment).

Implementation

Based on a private discussion with @cammellos:

  1. Spectated communities would be sort of garbage collected every X time (like once every 7 days if the user hasn't interacted with the spectated community).
  2. Limit the insertion of new spectated communities to a max number of 5-10, or any small(ish) number and in a FIFO fashion.

This automatic approach should be preferred because it could be confusing to users to leave/close/unspectate communities manually. Additionally, it wouldn't be obvious to users why manually closing spectated communities is necessary.

Scope

Although the problem exists in theory, it shouldn't affect users at the moment because creating communities is disabled on status-desktop and creation is also not available on mobile, therefore we should postpone work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant