Last modified: 2014-10-29 06:12:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56549, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54549 - Not load unnecessary data in token()
Not load unnecessary data in token()
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Normal normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-24 22:29 UTC by Kunal Mehta (Legoktm)
Modified: 2014-10-29 06:12 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-09-24 22:29:39 UTC
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
Comment 1 Kunal Mehta (Legoktm) 2013-09-24 22:29:41 UTC
patch
Comment 2 Kunal Mehta (Legoktm) 2013-09-24 22:29:43 UTC
Committed in r11359, thanks.

I do agree that token\(\) does need a re-think, it probably should be using a straight query rather than a generator, we also should be caching tokens per login session. Gonna leave this open for now so it can be properly fixed.
Comment 3 Kunal Mehta (Legoktm) 2013-09-24 22:29:44 UTC
I forgot to login again, sorry.

Anyway, I think that token\(\) should be rewrited. Its function should be restrict to just obtain the token. If we want lastrevid or other informations, it should place somewhere else. This will make token not bind to a page.
Comment 4 Kunal Mehta (Legoktm) 2013-09-24 22:29:46 UTC
- **assigned_to**: nobody --> legoktm
Comment 5 Ricordisamoa 2014-03-16 01:42:54 UTC
Ping
Comment 6 Andre Klapper 2014-03-16 18:40:43 UTC
(In reply to Ricordisamoa from comment #5)
> Ping

Ping to who? Ping about what? 
Just writing "ping" normally isn't very helpful.
Comment 7 Ricordisamoa 2014-03-16 20:06:17 UTC
(In reply to Andre Klapper from comment #6)
> Ping to who? Ping about what? 
> Just writing "ping" normally isn't very helpful.

Ping Legoktm: this bug has been assigned to him for over 3 months...
Comment 8 Kunal Mehta (Legoktm) 2014-03-18 17:54:15 UTC
I had a patch for this somewhere, but it didn't deal with invaldating the cache properly.

I'm probably just cookie licking this at this point, so unassigning myself.
Comment 9 Sorawee Porncharoenwase 2014-10-29 06:12:36 UTC
It does not query revisions as it was when I reported this bug anymore, so I would close it.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links