Skip to main content

View Diary: Site Updates (137 comments)

Comment Preferences

  •  There was a good reason for this (12+ / 0-)

    And we aren't done tweaking on it yet.

    The most basic WordPress site can keep track of the comments viewed in the database, just like we were doing so until a short time ago. However, we were noticing during the last debate that we were getting load spikes from all the viewed story records every time a new thread went up. Basically, storing the read comment info in the database is surprisingly expensive, and by doing this we're lightening the db load considerably. This leads to a better user experience for everyone, in that the site's more likely to run nicely. It's info that many sites store on a per-browser basis, anyway.

    This isn't the first time something like this has happened, either. On past Election Days (or occasionally other times the site was hella busy), I would just take the "new" comment stuff out entirely and make everyone deal with it. You wouldn't be able to see what comments you had read, but it made the site faster.

    We have a couple more things coming with this though. At some point, we want to make it smarter about what comments you've actually seen, as opposed to marking the comments that came in while you had the page open as "new" the next time you loaded the page. We're also looking at ways to store that viewed story info both locally and in memcached on the server side to allow that info to be shared more easily between multiple computers.

    tl;dr We did it for a good reason, and improvements are coming.


    -----------
    /* You are not expected to understand this. */

    by ct on Wed Oct 10, 2012 at 10:54:01 PM PDT

    [ Parent ]

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site