pull down to refresh

@k00b I noticed fetching all territory feeds went from consistently taking 8+ hours to just 15 minutes (!!)

I thought there was a bug in my code, but then I saw you made some performance improvements in the git history.

Nice job!!

228 sats \ 3 replies \ @k00b 27 Aug

Oh that was you. lol.

If you run into something that slow again, please let me know. It indicates a performance bug. It was nice learning about it sooner rather than later though.

reply
191 sats \ 1 reply \ @ek 27 Aug

Now that it’s really fast … couldn’t I refresh more often? 👀

I don’t want to impact the site. How can I reliably tell where’s the line?

reply
153 sats \ 0 replies \ @k00b 27 Aug
couldn’t I refresh more often?

It's not that fast yet. If you want to refresh more often, I recommend querying differently than you are. Filtering by territory is relatively slow and if you are grabbing from all territories anyway, you might as well filter on your end.

How can I reliably tell where’s the line?

If you run a query and it consistently takes more than ~100ms (your queries when compounded on each other were taking ~15000ms on average), you are doing something that's high load and ideally:

  1. you should rate limit yourself
  2. let me know so I can make it faster on our end and advise on how to make it faster on your end
  3. repeat
reply
1 sat \ 0 replies \ @ek 27 Aug

🫡

reply