Oddbean new post about | logout
 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. nostr:note10hgpd27h3kuq7ufs90m23kdvmj0p3f4m20t8cpqdew6zk6r68n4qan5alu 
 💜 
 In-built lightning? 
 will have NWC 
 Based. 
 basically all thanks to strfry and doug hoyte for inspiring this design. That guy is a perf genius. 
 i am not sure it is the priority to be addressing for nostr right now, speed is the least complaint i have about e.g. nostrudel, but it's definitely cool ! 
 It becomes an issue when you want to do more ambitious things. Current clients are memory constrained. Not needing to worry about memory and letting the OS page things in/out for any size db when doing algo queries and other types of local processing is quite nice.

Local first also enables lots of use cases, like using the app offline and having everything resync with negentropy when you’re back online. Also fast local fulltext search for privacy, p2p and local network syncing… 

The local algo thing is cool because the wasm algo api can have full query capability assuming the presence of a local db as an api, so local algos will be much faster. Coding everything to an in-process local relay enables lots more use cases and increases reliability in the presence of rogue relays in the outbox model… i need to write this up 😅 
 Would love to see a longish video of you walking through the architecture and the code 
 Definitely! I wanted to build a manim video of it 3blue1brown style. Started playing with manim to see if I could do it 
 Awesome 
 Can't wait to run on my phone...screen recordings look like it'll be a @Amethyst daily driver competitor 
 yes I have it running on my android phones and tablets and its glorious. Just need to get the keyboard working and android will be good to go