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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 26 2017, 1:14 PM

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.

valerio.bozzolan added a comment.EditedOct 26 2017, 4:09 PM

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
This comment was removed by valerio.bozzolan.

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

valerio.bozzolan triaged this task as Low priority.Jan 2 2018, 5:34 PM
Daimona closed this task as Resolved.Feb 10 2018, 4:30 PM