pull down to refresh
22 sats \ 5 replies \ @k00b 3 Apr 2022 \ on: Daily discussion thread
Something kind of neat about Stacker News daily earning that I didn't realize until after it was implemented: it's implicit staking. We could at some point increase the cost to post/comment and because those sats are redistributed to the most trusted users, they will get those sats back and more.
So happy.
I made the front page query much faster yesterday after fixing 2 things:
- removing the sub-query and replacing it with a join
- fixing a hack that I implemented wrong and was causing the front page query to execute twice when loaded
I made comments much faster today by using a lateral join of the subquery instead of a normal join ... when using the normal join I had to compute the entire subquery (very expensive) , but with the lateral join I can filter the subquery for just the stuff that I want (children comments) ... I did still have to use a subquery because the comments query is recursive and you can't use aggregates in a recursive query (but you can in a subquery).
reply
What’s the difference better post and recent?
reply
Do you mean top? Recent are recent posts (sorted by time). Top are the posts that did the best for a give period of time
Post takes you to a form to create a new post
reply
There are still 2 queries that can probably be improved a lot:
- determining how much a user has stacked - we currently sum up all tips they've received to do this ... we should just denormalize this ... this will shockingly save us >50ms per request for mature users
- denormalizing some of the notifications
reply
Awesome idea, I'm all for it...
I love the concept of sharing the fees among users...
Thanks for such a brilliant platform...
Stacker News is the future...
reply