damus-io / damus

iOS nostr client
GNU General Public License v3.0
2k stars 289 forks source link

Handle low storage (<1 GB) free space #1619

Open alltheseas opened 1 year ago

alltheseas commented 1 year ago

https://damus.io/note18yaem26028vr4ccxrmf5kdduu7y895sx4p0xu0rz5j9xa9yxetgsam9ulc

image

jb55 commented 1 year ago

On Wed, Oct 18, 2023 at 06:51:07PM -0700, alltheseas wrote:

https://damus.io/note18yaem26028vr4ccxrmf5kdduu7y895sx4p0xu0rz5j9xa9yxetgsam9ulc

I guess we could just nuke the cache and nostrdb and switch to low data mode ?

alltheseas commented 1 year ago

guess we could just nuke the cache and nostrdb and switch to low data mode ?

Yes. Although there might be reason for the user to not want deletion of some locally stored files - trying to think of potential poor user experience.

Low data mode: https://github.com/damus-io/damus/issues/919

alltheseas commented 1 year ago

Experienced < 1 GB storage. Recurring crash, and reboot on Damus.

alltheseas commented 9 months ago

1.7 (2) nostrdb note loading likely causing freeze and crash on devices with low free disk space

cc @danieldaquino @jb55

alltheseas commented 9 months ago

I wonder what to do when there isn’t enough disk space.

I’m thinking there are a few ways to address this:

  • We start a new NostrDB from scratch on the new container if there is no disk space
  • We make the NostrDB migration only when the user opts-in the Push notifications feature, and prevent them from doing so if there isn’t enough disk space

@jb55x, any preferences or other suggestions?