Last modified: 2013-11-02 03:46:51 UTC
Created attachment 9946 [details] Patch adds an option to limit the replacement selection The patch adds an option to limit the replacement selection query. In cases of huge data sets runtime/memory can be problem for the generation of the replacement list.
Created attachment 9947 [details] Using $dbr->select to set LIMIT instead of foreach
Thanks for the patch! I've added the "patch" and "need-review" keywords so developers know that the patch awaits code review.
MWJames, there's been a bit of a delay in the review of patches here -- we're in a "code slush" during which we concentrate on reviewing code that has already been committed to our source code repository (see http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/57950 for more details). But we'll try to respond to your contribution soon. My apologies for the wait.
Sumana - I think you may have misread this as a patch to MediaWiki, or a WMF-related extension. Or are WMF developers now reviewing patches to random extensions also?
I'm sorry, Yaron -- argh, I did misread this as a patch to a WMF-related extension. MWJames, you can disregard my comment # 3.
Okay, thanks for the clarification. And MWJames - I do plan to look into this patch soon. :)
MWJames - I finally looked into this. Having a limit for the query is a good idea, but maybe having it as a form input is "overkill"? Another option is to just have it as a LocalSettings.php setting, so that it defaults to 500 or something, but the admin can change it if necessary.
Well, I just briefly looked at the ReplaceText extension which indicates to have several design issue and the above patch-set would only increase its NPath complexity therefore closing this issue.