Last modified: 2007-11-30 15:42:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 7973 - Redundant cache expiration check in Language::loadLocalisation
Redundant cache expiration check in Language::loadLocalisation
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.8.x
PC Windows XP
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
Depends on:
Blocks: code_quality
  Show dependency treegraph
 
Reported: 2006-11-18 19:07 UTC by Edward Z. Yang
Modified: 2007-11-30 15:42 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Removes redundant code (636 bytes, patch)
2006-11-18 19:08 UTC, Edward Z. Yang
Details

Description Edward Z. Yang 2006-11-18 19:07:22 UTC
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.

r1=15803&r2=15804">http://svn.wikimedia.org/viewvc/mediawiki/branches/localisation-work/phase3/languages/Language.php?view=diff&r1=15803&r2=15804

It is unlikely that this has caused significant performance degradation.

Patch forthcoming.
Comment 1 Edward Z. Yang 2006-11-18 19:08:13 UTC
Created attachment 2735 [details]
Removes redundant code

Patch that removes the redundant code
Comment 2 Antoine "hashar" Musso (WMF) 2007-01-04 20:36:32 UTC
blocks #700 : code quality
Comment 3 Niklas Laxström 2007-11-30 15:42:40 UTC
r27980

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links