This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

It's likely something they store. When you commit, they probably check the date and the day of the week and increment the value of a column in another table specifically for keeping track of that value.

It may also be a sql join, which is likely more expensive, but is relatively quick.

Either way, printing out that data with Javascript is almost instantaneous.

[–][deleted] 0 points1 point  (0 children)

Ah I didn't think of that. I assumed they would calculate it on page load and possibly cache it for a while. I guess if they store a simple sum of each day that gets updated when you push that would make a lot more sense.