Page MenuHomePhabricator

CategoryFinder class should allow setting a maximum depth (to save resources)
Closed, ResolvedPublic

Description

I think that in the class CategoryFinder documented here it should be a way to set a maximum deep to save resources, as new feature.

(What is calling this class actually?)

Event Timeline

Hi, is this a feature request? Or about an existing but undocumented feature? Please summarize what this task is about in the task summary - thanks!

(What is calling this class actually?)

Please see the results of running grep in the directory: autoload.php and ./includes/specials/SpecialRecentchanges.php.

It's a feature request :)

(Interesting, yes, it's only used in SpecialRecentchanges. Good to know.)

Aklapper renamed this task from CategoryFinder deep to CategoryFinder class should allow setting a maximum depth (to save resources).Oct 26 2017, 5:45 PM

Change 388342 had a related patch set uploaded (by Valerio Bozzolan; owner: Valerio Bozzolan):
[mediawiki/core@master] Added an optional $maxdepth to CategoryFinder

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

In order to give a context to this enhancement, setting a maximum depth will be useful to preserve resources when using this MediaWiki extension:

https://www.mediawiki.org/wiki/Extension:CategoryToolbox

In facts, sometimes you don't need a full-depth recursion.

Change 388342 merged by jenkins-bot:
[mediawiki/core@master] Added an optional $maxdepth to CategoryFinder

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