Content deleted Content added
→Missing error check: reply |
→Missing error check: reply |
||
Line 5:
:This wouldn't be hard to do, but there's a hidden penalty. At the moment, I'm checking for invalid titles by creating a title object with [[mw:Extension:Scribunto/Lua reference manual#mw.title.new|mw.title.new]]. That is an expensive function - every time it is called on a new page, the [[WP:EXPENSIVE|expensive parser function count]] is increased. And if the expensive function count for the whole page goes over 500 while the module is running, it will produce a script error. On a blank page, this would give us a limit of 250 pages (250 current + 250 new), and on a page that already contains lots of expensive parser functions, that number will be less. We can use [[mw:Extension:Scribunto/Lua reference manual#pcall|pcall]] to avoid the script error, but the fallback behaviour would be to treat valid titles as if they were invalid, which is just as bad. This would only be a problem if someone made a move request involving hundreds of pages, though - are you aware of any such requests that have happened in the past? <p>An alternative would be to not use mw.title.new, but to just check for bad characters in the title. This wouldn't increase the expensive function count, but it also wouldn't catch invalid interwiki prefixes. It would, however, have the advantage that we could tell the user exactly what character was invalid, e.g. 'invalid character ">" found in the "new3" parameter'. We could also check the current''n'' parameters with this check, as it seems like it might be useful. Do you think this is a good idea, and if so, what wording would you like for the error message? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 04:50, 30 April 2014 (UTC)</p>
::Recall that we had to hard-code each parameter in move-multi when it was a template, and thus the limit was 30 because that's where we stopped adding parameters. I've seen someone request about 90 moves by putting together three sets of 30-move requests, but don't want to encourage that type of request, which probably is better handled as a proposal to change a naming convention on some guideline's or WikiProject's talk page. I've noticed that the module seems to run a bit slower than the template did, but that trade-off seems worth it compared to the time it takes to manually fix mistakes, and this template isn't used that frequently. Yes, telling the editor which character is invalid seems helpful – 'invalid character ">" found in the "new3" parameter' works for me. I wouldn't worry about the interwiki prefixes as I've never seen anyone request moves for other wikis. Just checking for File: Category: Talk: etc. like we already do is probably enough. Thanks, [[User:Wbm1058|Wbm1058]] ([[User talk:Wbm1058|talk]]) 05:26, 30 April 2014 (UTC)
:::In that case, we could add both checks. I'll do that in the sandbox so that you could take a look. As for the execution speed, we should be able to improve that by only using arguments from the parent frame instead of from both the current frame and parent frames as we do now. This would mean that <code><nowiki>{{subst:#invoke:requested move|main|new=Foo}}</nowiki></code> wouldn't work, but <code><nowiki>{{subst:requested move|new=Foo}}</nowiki></code> would still work. That will halve the number of wikitext argument lookups we need to make, which is often a cause of performance bottlenecks in Lua. If the bottleneck is the increased amount of error checking, though, then there's not much we can do, but we won't know which it is without trying it. — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 05:47, 30 April 2014 (UTC)
== Moving over a disambiguation page implies that a multi-move request should be submitted ==
|