https://bugzilla.wikimedia.org/show_bug.cgi?id=54549
Web browser: --- Bug ID: 54549 Summary: Not load unnecessary data in token() Product: Pywikibot Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/patches/606/ Reported by: Anonymous user Created on: 2013-04-08 12:22:18 Subject: Not load unnecessary data in token() Assigned to: legoktm Original description: In token(), It queries info and *all* revisions of a page. Querying all revisions is too expensive and unnecessary. For example, if I just want to process the last revision of several pages and put them back, with the old code, it loads all revisions when putting. It makes putting in rewrite branch spend time about 10x compared to that in the trunk.
The patch I am presenting just do not load revisions. It shouldn't break other functions since needed data has included in the info of a page.
---- Pywikibot branches/rewrite/ (r11357, 2013/04/07, 14:50:30, ok) Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] unicode test: ok