Update post view counts in batches
Open, LowPublic



Every time a post is loaded, we update that post's view_count in the database.


This happens in a goroutine, ensuring post rendering is still fast. But it can cause additional load on the database and block future requests on engines where it matters (like SQLite).


Instead of doing view_count = view_count + 1 every time we serve a post, we should temporarily keep track of additional views in memory, and then write that data to the database after a short interval (e.g. 5 seconds).

Event Timeline

matt triaged this task as Low priority.Dec 3 2018, 4:16 PM
matt created this task.
matt created this object with visibility "Public (No Login Required)".
matt created this object with edit policy "All Users".