rimu

u/rimu@crust.piefed.social
7 posts · 54 comments

Recent posts

Recent comments

Radio Free Asia was a news agency operated from 1951 to 1955 by the Central Intelligence Agency, through the Committee for Free Asia, to broadcast anti-Communist propaganda.

https://en.wikipedia.org/wiki/Radio_Free_Asia_(Committee_for_a_Free_Asia)

The modern Radio Free Asia was founded in 1996 and has nothing to do with the CIA: https://en.wikipedia.org/wiki/Radio_Free_Asia

MBFC rates RFA as 'left of center' and 'highly factual' - https://mediabiasfactcheck.com/radio-free-asia/

Yes, the votes table is absolutely massive (10s of GB) so even with perfect indexes, queries & joins on it are slow enough to become a problem if you are doing many things. For example when listing a page of posts in a community when there are 70 posts per page that'd mean lots of interaction with the votes table, that I'd rather avoid.

Instead, we get the last 3000 votes the viewer cast (a single DB query, or less if it's in redis already, which is another layer of cache) and hold that in memory. While creating the list of posts a "viewer has voted for this" flag is set if the post id is in the list of votes from earlier. The list of votes is sorted so an efficient binary search can be done.

That's just one part of it, there are about 3 or 4 other similar optimizations where front-loading some data drastically reduces the work involved in getting a lot of posts at once. I've put days into speeding up the 'get a list of posts' API endpoint and it's become acceptable but still not great.

The next version of the API is going to be a lot slimmer both in the responses it generates and the CPU work involved in making them. At present we are trying to produce API responses that are very close to what Lemmy provides and that brings a lot of baggage.

How many votes do you think you do per day? Is it about 100?

edit: I looked at your profile more closely - yes, you DO vote a lot. That would explain it - the cache of recent votes, which the API uses, was too small for your volume. I've increased it by 10x, that should do.

I know, right.

After they've finished doing maintenance no one will be able to see any visible difference and will just have to believe them when they ask for more money. They were upfront about that so maybe it'll go ok but yeah seems risky as hell.

Seeing as we’re measuring dicks here.

That's not what is going on, no. You called my work "fresh college-grad coding" and I described my experience to assure you that it is not. I made no intimations about the length of your dick, qualifications or credibility.

Good day, sir.

Oof. Lemmy as a decrepit grandma is a bit unkind.

Without their pioneering work in the early quiet days and absorbing the first wave of reddit refugees, PieFed wouldn't have anything to glom onto and build from so there is a symbiosis going on.