Replying to Avatar jex0

Been digging through nostrdb source code and finally grok why it's so fast:

No JSON parsing at query time. Events are stored in a binary format (like flatbuffers), memory-mapped via LMDB, and accessed with pointer arithmetic.

Most databases: parse JSON → allocate strings → copy data → query

nostrdb: mmap → pointer math → done

Zero-copy access. The event is just *there* in memory already.

Same trick strfry uses. Local-first Nostr apps benefit massively from this — Dave in notedeck queries local nostrdb instead of hitting relays, which is why it feels instant.

Avatar
Parker 15h ago

Go ahead and zap me 10 sats.

Reply to this note

Please Login to reply.

Discussion

No replies yet.