Last modified: 2014-06-19 21:37:25 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 T24808, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22808 - Cache #ifexist results and do not count cache hits as "expensive" parser function calls
Cache #ifexist results and do not count cache hits as "expensive" parser func...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Liangent
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-11 18:28 UTC by Malafaya
Modified: 2014-06-19 21:37 UTC (History)
6 users (show)

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


Attachments

Description Malafaya 2010-03-11 18:28:36 UTC
Currently, the parser considers all #ifexist calls as an "expensive" call. The problem occurs when you have a page which includes a template with a single #ifexist call several times. The page checked for existence is always the same but the total function call is multiplied by the number of times the template is included.

A solution would be to cache #ifexist results (and other expensive functions') and use them, without incrementing the expensive function call counter.
Comment 1 Platonides 2010-03-11 18:42:47 UTC
In fact, those repeated checks will be hitting Title::newFromText instead of making db calls.
Comment 2 Malafaya 2010-03-11 18:52:23 UTC
All right.
So, it means they are already using a cache but still being considered as expensive.
In that case, just the expensive call counter needs no update.
Comment 3 Platonides 2010-03-11 22:03:04 UTC
Right. Although it may be tricky, since the cache is at a lower level thabn parserfunctions.
Comment 4 Gerrit Notification Bot 2013-05-28 17:15:12 UTC
Related URL: https://gerrit.wikimedia.org/r/65828 (Gerrit Change Ie4dd9fd647dc79a2b31bc44ef8b6a641b54cfb78)
Comment 5 Gerrit Notification Bot 2013-08-09 17:52:54 UTC
Change 65828 merged by Aaron Schulz:
(bug 22808) Don't count "expensive" calls for cached titles

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

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


Navigation
Links