Page MenuHomePhabricator

Redundant cache expiration check in Language::loadLocalisation
Closed, ResolvedPublic


Author: ezyang

When performing cache checks for localization files, both
self::isLocalisationOutOfDate( $cache ) and a foreach loop comparing filemtime
of the dependencies are done. This appears to be redundant, as
isLocalisationOutOfDate appears to do the same process, and the $expired
variable does not appear to be used.

If they are not actually redundant, recommend adding a comment as to the
function of the code block. I do not have a working memcached extension so I
cannot say.

The discrepancy manifested in trunk on r15823 when Tim Starling merged in the
localisation-work branch. The switch to the isLocalisationOutOfDate appeared to
have happened r15804, and replaced the $expired variable, strongly suggesting
that yes, this was an oversight on Tim Starling's part.

It is unlikely that this has caused significant performance degradation.

Patch forthcoming.

Version: 1.8.x
Severity: minor
OS: Windows XP
Platform: PC



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:26 PM
bzimport set Reference to bz7973.
bzimport added a subscriber: Unknown Object (MLST).

ezyang wrote:

Removes redundant code

Patch that removes the redundant code


hashar added a comment.Jan 4 2007, 8:36 PM

blocks #700 : code quality