Skip to content

Member list uses too much space in local storage #2674

Description

@max-nextcloud

Describe the bug
As observed in #2518 the member list starts using lots of storage in localstorage if there are many members.

Each member uses several kb of storage:

localStorage.getItem('collectives/pinia/circles/circlesMembers').length
// 282813
const members = JSON.parse(localStorage.getItem('collectives/pinia/circles/circlesMembers'))
JSON.stringify(members.LvrxIVdG4ET9VQwrwSIeW5JQsPIPWxK[0]).length
// 6049

To Reproduce
Steps to reproduce the behavior:

  1. Open a collective
  2. Open the web dev tools
  3. Get the list of members as described above
  4. Pick one collective (f.e. using autocomplete on members) and one member to get it's size.

Expected behavior
We should only store what's needed - at most what currently is in member.basedOn.owner (350 bytes for me).

Browsers have 5 Mb of local storage. So with 6k per member we currently cannot handle more than 1k members in total for all collectives of a user. With < 500 bytes on average 1k members would still only consume 10% of storage.

Server details:
cloud.nextcloud.com

  • Collectives app version: 4.4.2
  • Nextcloud version: 34.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions