Global Feed Post Login
Replying to Avatar jb55

Traditionally when using databases you have to serialize data in and out. With nostrdb your in-memory data structures are the same as the disk representation.

It uses virtual memory to map the entire database (up to 32gb). When accessing data the operating system only reads parts of this file into memory when accessing data.

The end result is you get the speed of an in-memory data structure but without having to allocate 32gb of memory to read it all (bad and impossible)

Since nostrdb uses lmdb, it arranges the data into an efficient search tree so that the most common accessed data is always hot in the cache. The end result is that the code is much simpler and faster.

The next step is to replace the in memory note cache with nostrdb as well.

This will put damus apps in a league of their own, thanks for your patience as I hook all this up 🙏 nostr:note1jnshseypcwa9qke5z75w7dypr33at4lcyk8fhny5657cuyry3xesqhufqv

Avatar
Pextar 2y ago

Amazing work Will🤙

Reply to this note

Please Login to reply.

Discussion

No replies yet.