Revision: 4835 Author: wikipedian Date: 2008-01-09 17:04:10 +0000 (Wed, 09 Jan 2008)
Log Message: ----------- re-enabled preloading for XML parsing, with a lower page number though
Modified Paths: -------------- trunk/pywikipedia/replace.py
Modified: trunk/pywikipedia/replace.py =================================================================== --- trunk/pywikipedia/replace.py 2008-01-09 17:00:47 UTC (rev 4834) +++ trunk/pywikipedia/replace.py 2008-01-09 17:04:10 UTC (rev 4835) @@ -589,10 +589,10 @@ if namespaces != []: gen = pagegenerators.NamespaceFilterPageGenerator(gen, namespaces) if xmlFilename: - # XML parsing is slow enough that preloading would make bot even slower - preloadingGen = gen + # XML parsing can be quite slow, so we preload less pages each time. + preloadingGen = pagegenerators.PreloadingGenerator(gen, pageNumber = 20) else: - preloadingGen = pagegenerators.PreloadingGenerator(gen, pageNumber = 50) + preloadingGen = pagegenerators.PreloadingGenerator(gen, pageNumber = 60) bot = ReplaceRobot(preloadingGen, replacements, exceptions, acceptall, allowoverlap, recursive) bot.run()
pywikipedia-l@lists.wikimedia.org