jb55 on Nostr: notedeck should reach theoretical optimal performance. Loading the database is just a ...
notedeck should reach theoretical optimal performance. Loading the database is just a single mmap calI. There is no heavy serialization needed. The initial queries just scans the local index for note ids (u64). Once we have those, its a quick btree lookup into virtual memory for a flatbuffer-like binary note pointer. Effectively zero copy queries for every note in the database.
Will be very surprised if someone can make a faster client than this. This will be faster than any sqlite or postgres client. Notice the cold start time. It’s instant to load, even for databases that are terabytes in size.
On top of this, we skip the entire web stack for rendering and render directly to the gpu on every platform, we can render 1000s of frames per second with hundreds of nostrdb queries per frame.
People may think I’m exaggerating for marketing or promotion but i’m really not. Any web client will never be faster than notedeck, because the web does not have access to virtual memory capabilities. This is a the reason I am calling it a next-gen client.
Someone once said damus was slow and I took that personally.
looks fast!
Published at
2024-11-19 12:11:28Event JSON
{
"id": "7d9a7f946ac32da64bc26c77b62fbb450d879b60909dcd569857455e02d867d7",
"pubkey": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
"created_at": 1732018288,
"kind": 1,
"tags": [
[
"p",
"2bc1cc9268507667c92ea0ec6aa652fc78f1185a9fc9d976910aa6f237811ea5"
],
[
"p",
"2bc1cc9268507667c92ea0ec6aa652fc78f1185a9fc9d976910aa6f237811ea5"
]
],
"content": "notedeck should reach theoretical optimal performance. Loading the database is just a single mmap calI. There is no heavy serialization needed. The initial queries just scans the local index for note ids (u64). Once we have those, its a quick btree lookup into virtual memory for a flatbuffer-like binary note pointer. Effectively zero copy queries for every note in the database.\n\nWill be very surprised if someone can make a faster client than this. This will be faster than any sqlite or postgres client. Notice the cold start time. It’s instant to load, even for databases that are terabytes in size.\n\nOn top of this, we skip the entire web stack for rendering and render directly to the gpu on every platform, we can render 1000s of frames per second with hundreds of nostrdb queries per frame.\n\nPeople may think I’m exaggerating for marketing or promotion but i’m really not. Any web client will never be faster than notedeck, because the web does not have access to virtual memory capabilities. This is a the reason I am calling it a next-gen client. \n\nSomeone once said damus was slow and I took that personally. nostr:note10hgpd27h3kuq7ufs90m23kdvmj0p3f4m20t8cpqdew6zk6r68n4qan5alu",
"sig": "e6cf7df83c34a934ee9a3a5d5db50e148d94ef74b1b5fd0b2afe3d8e7d6146440c46550b4fb30a5114a72204ef262ab759e40f73b917755bbfa2a3b8aff96ee4"
}