r71172 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71171‎ | r71172 | r71173 >
Date:21:37, 16 August 2010
Author:simetrical
Status:ok (Comments)
Tags:
Comment:
Save 200 useless queries per category page view

Yeah, I kind of wish this was a joke. Granted, they're extremely fast
queries, and maybe they don't happen on all configs, but still. And I'm
still seeing 148 queries per view, mostly Revision::fetchFromConds() . . .
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -276,7 +276,7 @@
277277
278278 $res = $dbr->select(
279279 array( 'page', 'categorylinks', 'category' ),
280 - array( 'page_title', 'page_namespace', 'page_len',
 280+ array( 'page_id', 'page_title', 'page_namespace', 'page_len',
281281 'page_is_redirect', 'cl_sortkey', 'cat_id', 'cat_title',
282282 'cat_subcats', 'cat_pages', 'cat_files', 'cl_sortkey_prefix' ),
283283 array( 'cl_to' => $this->title->getDBkey() ) + $extraConds,
Index: trunk/phase3/RELEASE-NOTES
@@ -293,6 +293,7 @@
294294 * (bug 24714) Usage of {{#dateformat: }} in wikis without $wgUseDynamicDates no
295295 longer pollutes the parser cache.
296296 * (bug 17031) Correct which characters the parser allows in tag attributes.
 297+* Save 200 useless queries on each category page view
297298
298299 === API changes in 1.17 ===
299300 * (bug 22738) Allow filtering by action type on query=logevent.

Comments

#Comment by Simetrical (talk | contribs)   18:06, 17 August 2010

The fetchFromConds() queries are because I didn't have APC/memcached enabled. I did have $wgCacheDirectory set, and isn't the CDB file supposed to be used for this? Or is it only for the default messages? Even with memcached, these are still network fetches, and lots of them.

#Comment by Nikerabbit (talk | contribs)   20:31, 17 August 2010

Only localisation cache uses CDB as far as I know.

#Comment by 😂 (talk | contribs)   20:35, 17 August 2010

And interwiki cache.

Status & tagging log