

Ask PG: How often are the ratings for HN submissions crunched - monological

I was just curious how it's implemented.<p>I know the formula is:<p>(p - 1) / (t + 2)^1.5<p>where p and t are:<p>p = votes (points) from users.
t = time since submission in hours.<p>So to reduce the load on the server, is
the calculation done every X number of 
minutes? Then when you query for the 
stories, do you just sort by rating desc?
======
pg
It's done per story when one's score changes after a vote, and also
occasionally for random stories near the top. See the source.

~~~
kyro
I think the equation needs to be tweaked a bit, honestly. Some of these
stories that get 100+ votes stay on the front page for longer than they really
should, taking up space that many other interesting, yet less popular, stories
could occupy.

~~~
pg
Yeah, you're probably right. There are now so many more votes on the top
stories that they do stay around longer than they used to. I just increased
gravity to 1.8 and the frontpage looks better now.

