Page MenuHomePhabricator

Option to restrict view counter per namespace
Closed, DeclinedPublic

Description

http://www.mediawiki.org/wiki/Manual:$wgHitcounterUpdateFreq is there to improve the performance by lowering the database load a bit but it has a major disadvantage: your view counts become wrong and lower than as without using $wgHitcounterUpdateFreq.

My thought is that it would be more useful for people to not count views on less important namespaces instead and only count e.g. MAIN. Sure the main ns takes most of the views but performance boost should be the same and in the end you don't ruin your view counters as with $wgHitcounterUpdateFreq.


Version: unspecified
Severity: enhancement

Details

Reference
bz27576

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
DeclinedNone

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:25 PM
bzimport set Reference to bz27576.
bzimport added a subscriber: Unknown Object (MLST).

If there was a hook (bug 24297) you can do this with a few lines of code in LocalSettings.php
Marking as dependency.

Thanks. Looking into it.

Maybe it's worth thinking about removing $wgHitcounterUpdateFreq? It's simply leading to lower and incorrect view counts and the performance boost is questionable.

the question is what creates more database load: simply counting each page view or checking the page's namespace to return false?

Maybe there's a "light" to only count the main ns?

Moving to Database only because it is a bit more precise than General/Unknown.

Marking as Lowest, since nobody seems to be working or planning to work on this currently.