Re: Delayed Statistic Counters
Reply #1 –
Heh, I was just looking at that thinking there should be a setting.
// Add 1 to the number of views of this topic (except for robots).
if (!$user_info['possibly_robot'] && (empty($_SESSION['last_read_topic']) || $_SESSION['last_read_topic'] != $topic))
{
increaseViewCounter($topic);
$_SESSION['last_read_topic'] = $topic;
}
First off, it shouldn't update for every view that you've made. It should only update once per session (no matter how many other topics you look at) and it should only update when there is a new post or edit in the topic (not sure about edits). Also, the circuit breaker should kick in and disable this completely when the load is too high. That should handle most issues, but a hook in the function could do it via caching or a topic_views table which would be in memory. That's another idea.
Anyway, are you having issues with load? I wouldn't start trying to change things until you start seeing issues. Especially with numbers like that. Users seem to be picky about their counts (downloads, views, stats, etc).