jb55's avatar
jb55
_@jb55.com
npub1xtsc...kk5s
I made damus, npubs, and zaps ⚡️ Independent bitcoin core and lightning dev.
jb55's avatar
jb55 3 weeks ago
I wasn't happy that generating dashboard reports was taking over a second, so i implemented a new query plan optimized for efficient scans over all notes in #nostrdb i've reached the limit of physics for how fast i can make the #notedeck dashboard: down to 288 milliseconds (0.28 seconds) for 1.46 million notes at least this should scale nicely when I dump 40 million more notes into my local node. i have a performance addiction problem...
jb55's avatar
jb55 3 weeks ago
modern problems require modern solutions image
jb55's avatar
jb55 3 weeks ago
you will get absolutely wrecked by opportunity cost if you aren’t measuring things. Even planning becomes worthless because you end up making plans for things that aren’t important
jb55's avatar
jb55 3 weeks ago
i've refactored this into a really cool pattern: a single fold over the entire database in a separate thread. all dashboard reports are accumulating state from this fold. snapshots of this accumulated state are sent to the main thread for rendering every 16ms or so. no waiting for loading screens, you can see the reports update as the data streams in from potentially billions of records. the only memory used is the accumulated state, everything else is touching zero-copy nostr note data in nostrdb (which is just a large file that is mmap'd) overkill? maybe. business stuff is boring. had to make the project a fun technical challenge so I would actually do it lmao View quoted note →
jb55's avatar
jb55 3 weeks ago
maybe im too video game brained but had an idea on our all hands: What if you gamified KPIs: set a bunch of small, medium and longterm goals and map them to a level-up system. Total users, revenue could be individual skills that you level up from 1 to 99 Everyone within the company could see the entire dashboard in realtime
jb55's avatar
jb55 3 weeks ago
the right not to be tracked should be a human right. companies should be penalized for human rights abuses accordingly