Use WikiPage::doQuickEditContent for speed up batch.

WikiPage::doEditContent was extremely slow, because it updated link tables
etc. For batch processing, we now use WikiPage::doQuickEditContent, which is
considerably faster.
This commit is contained in:
Daniel Kraus
2014-06-10 16:45:23 +02:00
parent d7571c4922
commit 1cafdc4b1a
2 changed files with 3 additions and 4 deletions

View File

@ -324,10 +324,10 @@
$content = $page->getContent(); $content = $page->getContent();
$article = Article::newFromWikiPage($page, $context); $article = Article::newFromWikiPage($page, $context);
LinkTitles::parseContent($article, $content); LinkTitles::parseContent($article, $content);
$page->doEditContent($content, $page->doQuickEditContent($content,
$context->getUser(),
"Links to existing pages added by LinkTitles bot.", "Links to existing pages added by LinkTitles bot.",
EDIT_MINOR | EDIT_FORCE_BOT, true // minor modification
$context->getUser()
); );
} }

View File

@ -71,7 +71,6 @@ class SpecialLinkTitles extends SpecialPage {
} }
} }
/// Processes wiki articles, starting at the page indicated by /// Processes wiki articles, starting at the page indicated by
/// $startTitle. If $wgLinkTitlesTimeLimit is reached before all pages are /// $startTitle. If $wgLinkTitlesTimeLimit is reached before all pages are
/// processed, returns the title of the next page that needs processing. /// processed, returns the title of the next page that needs processing.