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:
- Open a collective
- Open the web dev tools
- Get the list of members as described above
- 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
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:
To Reproduce
Steps to reproduce the behavior:
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