Last modified: 2013-11-07 02:11:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57952, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55952 - $title->getPageLanguage not cached at all, called thousands of times on the same title
$title->getPageLanguage not cached at all, called thousands of times on the s...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.22.0
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-20 22:24 UTC by Bawolff (Brian Wolff)
Modified: 2013-11-07 02:11 UTC (History)
8 users (show)

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


Attachments
profiling output from Commons:Featured_picture_candidates/Log/October_2013 (38.05 KB, text/plain)
2013-10-20 22:24 UTC, Bawolff (Brian Wolff)
Details

Description Bawolff (Brian Wolff) 2013-10-20 22:24:57 UTC
Created attachment 13529 [details]
profiling output from Commons:Featured_picture_candidates/Log/October_2013

Patch awaiting review at Gerrit change #90769


$title->getPageLanguage() gets called a lot (sometimes in the thousands of calls). Usually for the same page. This calls a hook, which can be somewhat expensive. There should be an in-process cache for it.

In particular, for https://commons.wikimedia.org/wiki/Commons:Featured_picture_candidates/Log/October_2013 we have the following profiling lines:

22.42% 12.819275   5118 - hook: PageContentLanguage
20.58% 11.766860   5118 - PageTranslationHooks::onPageContentLanguage


There may be more things that can be optimized for that page perhaps. I included some profiling data as an attachment.

For original context see https://commons.wikimedia.org/w/index.php?title=User_talk:Daniel78&oldid=107548310#Bot_doesn.27t_close_new_nominations
Comment 1 Gerrit Notification Bot 2013-10-20 22:25:58 UTC
Change 90769 had a related patch set uploaded by Brian Wolff:
Cache page content language in Title object.

https://gerrit.wikimedia.org/r/90769
Comment 2 Gerrit Notification Bot 2013-11-07 01:43:03 UTC
Change 90769 merged by jenkins-bot:
Cache page content language in Title object

https://gerrit.wikimedia.org/r/90769

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


Navigation
Links