nostrdb is now much faster than strfry when processing duplicate incoming events. strfry will fully parse and validate an event before checking if it exists in the local DB. nostrdb will:

1. Check if the ID exists in the database without fully parsing the event

2. Only validate the event if we donโ€™t have it in the database yet.

Processing 4GB of duplicate contact lists now takes 200ms instead of 6 seconds on an old laptop.

This matters a lot on mobile devices where we donโ€™t want to burn battery when we donโ€™t need to nostr:note1rq2tgyezyxj7tsgydmd9vvcgmm8luuylgjuxtm9sm8y2e347rsjshgx7gh

Reply to this note

Please Login to reply.

Discussion

Fantastic work. Insane performance

U r relentless

This will break my usecase when I'm trying to get my hands warm in the winter ๐Ÿ˜ž

Devs building desktop web app, need to test with mobile devices too, to test and optimise for performance and battery.

?? Better performance will almost always mean better battery life in this case

Amazing

Is there a way to use nostrdb outside of Damus?

nostrdb is just a library, it has nothing to do with damus

Cool bro! Congrats ๐Ÿ‘๐Ÿผ๐Ÿ‘๐Ÿผ๐Ÿ‘๐Ÿผ

How hard do you think it's to have a WASM + JS port? I might have an incentive to do the port. IndexedDB on browser is slow as hell