We just rolled out a simple update to the way notifications are calculated in the navigation bar. Previously they would be calculated on the fly, which would take about 0.06 seconds for each page view in order to count your new messages across the site. This was less than ideal, because it slows down load time, and if we need to calculate this number for 10, 20, or 50 users in a second, it's a lot of strain on the database server.

The new method is simply caching it, so it has no affect on load time. Instead, when you post a comment, the cache is incremented for the appropriate user. If you post a comment on a giveaway, then the giveaway creator has their new messages incremented by one, and if your reply is in response to someone else, their notifications increment. Of course when you visit the messages page, and Mark as Read, this number is reset to zero.

This works well, but it may be slightly inaccurate at times. For example, if someone responds to one of your comments in a giveaway, and that giveaway is then deleted, your message count will still show you have a new message. However, when you visit the messages page, you simple won't see the message, since it's no longer available. An alternative would be recalculating the cache for all users in a deleted giveaway or discussion, but doing so for thousands of users might not be the best route. I think it's an acceptable trade off though, and it remains accurate 99% of the time, and we get faster load times for every page view, and less load on the database server.

Lastly, the notification count in the navigation bar has been reset for everyone, so if you had previous unread messages listed there, you'll notice it's been cleared.

8 years ago

Comment has been collapsed.

I'm just pretend there was no update then :D

8 years ago
Permalink

Comment has been collapsed.

Sounds good to me :)
Thanks for all your effort in speeding up the browsing experience of Steam Gifts!
I'll take latency over accuracy any day.

8 years ago
Permalink

Comment has been collapsed.

I don't quite understand but as long as message notifications work I'm happy.

8 years ago
Permalink

Comment has been collapsed.

Wow I can't believe that was being calculated on the fly for every page load. Whoa! As a CS person I can just feel the server being so relieved it is no longer constipated. Okay, need to stop being weird.

8 years ago
Permalink

Comment has been collapsed.

Sounds like a tradeoff most users would gladly accept. Makes sense from a technical standpoint certainly. Thanks again for all your guys' work.

8 years ago
Permalink

Comment has been collapsed.

Lastly, the notification count in the navigation bar has been reset for everyone, so if you had previous unread messages listed there, you'll notice it's been cleared.

Ahh, finally...thanks for that.

8 years ago
Permalink

Comment has been collapsed.

You do realize you can do that yourself? Just click "mark all as read"

8 years ago
Permalink

Comment has been collapsed.

I im lvl 5, resume?

View attached image.
8 years ago*
Permalink

Comment has been collapsed.

Cool. thanks

8 years ago
Permalink

Comment has been collapsed.

Do I have to change anything to receive notification and it will be an auto function ?

8 years ago
Permalink

Comment has been collapsed.

Test it for yourself with this one.

8 years ago
Permalink

Comment has been collapsed.

How about disabling message notifications for comments posted in your own giveaways? Or at least make it an option. Many people don't like it because of the 'thank you spam' that results. Prior to SG v2 it was not like that and I think it was better for it.

8 years ago
Permalink

Comment has been collapsed.

This has been suggested many times. I don't know why they haven't bothered to go that route yet since it seems like many users here want this.

8 years ago
Permalink

Comment has been collapsed.

Here's a suggestion regarding the messages count inaccuracy, if that is of any interest.

7 years ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.