me wondering why there is a slight 500ms delay when booting #notedeck. turns out it was fetching 11,000 notes (500 * 22 timelines) on a single core. I'm not even that mad now... but still will optimize. maybe we could do this lazily or make startup queries multi-core. pretty crazy it takes this much to even notice performance issues.

Reply to this note

Please Login to reply.

Discussion

optimization is the most fun part of programming, once you wrap your head around how to use the profiler.

i totally nailed some nasty memory and CPU utilization problems in some new code i added to my relay today and it's so smooth now

Are those loading from a relay or a local cache?

local

Don't you already have a separate rendering thread? Is this an initialization task that happens before the rendering thread is created?

querying is so fast usually we just do it on the render thread. we easily hit 500 to 1000fps with doing hundreds of queries per second on the screen. a query is mostly just a btree lookup with no serialization when data is hot in the page cache.

this is more of a unique situation when it does the initial load at startup

I like dave on notedeck