Skip to content

General Discussion

A place to talk about whatever you want

47 Topics 253 Posts

Subcategories


  • This category is synchronized with the Announcements category on test.pavilion.tech

    2 Topics
    6 Posts
    julian@test.pavilion.techJ

    Why does it not get properly inserted into NodeBB? Let's find out.

  • This category is synchronized with the ActivityPub category on community.nodebb.org

    24 Topics
    184 Posts
    julian@community.nodebb.orgJ

    For awhile I've been wondering what the slow-down was when I loaded /world, the curated timeline for a NodeBB user. Seemingly every time I figured out what it was, it would slow down again after some time.

    Today it was taking 3+ seconds to load just the data, whereas our other pages (category listing, topics, etc.) all finish in under 250ms, including html generation, user data, etc... Certainly something was amiss!

    As it turns out, asking your database to do an intersection of two data sets, one containing 23774 items, and the other containing 23606 items, is a little much. I guess this is what they mean when they talk about #webscale hah! (#fediscale?)

    Specifically, I was intersecting the set containing all fediverse topics, with the set containing everything in the user's inbox, in their entirety. While this gave me a very precise answer, there was a huge cost to that precision.

    After talking with @baris about this, we decided that sacrificing some level of precision would almost certainly go unnoticed. Instead of having the database intersect those two data sets, we would pull the most recent 500 entries from both and intersect them manually.

    So, /world is now limited to 500 topics. Don't worry, you won't notice.

    That simple fix brought the execution time down from ~1500ms to ~40ms, which is more in line with our expectations!