it hurts to read this but I agree, the web is not a great fit for chat specially if you add gift wraps into the mix. i've spent countless hours optimising Chachi and the performance is still not acceptable. perhaps i'm just bad lol

Reply to this note

Please Login to reply.

Discussion

Chachi is honestly the best web chat app I’ve seen on Nostr.

Maybe I just don’t really know web that well — on native I rely a lot on database + caching tricks, and I’m not sure if that’s doable in the browser.

Communi-keys communities avoid gift wraps yes? Is it any easier working with things on that side?

Yes, both communikeys and NIP-29 groups are easier to work with. But NIP-17 DMs use gift wraps, and the ecash wallet uses NIP-44 encryption. There's a bunch of data I need to store client side for incremental sync and to avoid having lots of encrypt/decrypt ops.

The browser has key-value storage and indexed storage and I use both, but even with proper indexes and query optimizations you hit a perf wall on web once you store thousands of records. There's also the issue that durability is not guaranteed and DB might get pruned once you hit certain quotas.

Yikes I feel for you, sounds like trying to fit everything in a carry-on bag and the airline keeps changing policy.

What about just getting rid of NIP17 DMs?

yeah, perhaps it makes sense to have a separate app that just implements NIP-17 DMs like Coop does for desktop and focus Chachi on NIP-29 groups :nostopus_thinking:

Bit random but do you know of any clients using NIP44 DMs? As in NIP4 with upgraded encryption but no gift wrap?

i didn't know that was a thing :nostopus_thinking: don't know of any clients that do this, it's either NIP-04 (majority) or NIP-17 afaik. there's also nostr:npub1g53mukxnjkcmr94fhryzkqutdz2ukq4ks0gvy5af25rgmwsl4ngq43drvk 's double ratchet DM spec https://github.com/nostr-protocol/nips/pull/1813