jayvdb added a subscriber: Multichill. jayvdb added a comment.
In https://phabricator.wikimedia.org/T129193#2119074, @darthbhyrava wrote: > - gen.request['rcprop'] and the extra p['ns'] in `recentChanges` The default rcprop value is documented on mw:API:RecentChanges <https://www.mediawiki.org/wiki/API:RecentChanges> as `timestamp|title|ids`, so imageuncat value of `title|user|comment|ids` has two additional props : `user` and `comment`. They are explained on the aforementioned API manual page. `recentChanges` fetches these additional properties, but then it only uses `p['title']` and `p['ns']` , so it is not using the values that prop comment or user provide. So why is it there? It was added in September 2009 by https://phabricator.wikimedia.org/rPWBC7654b64b48702bd2149ca7f8d76bd8f26cde22db , with a vague commit message referring to @Multichill who might know more about why it was added. However a little git blame analysis allows us to deduce why the change happened. In September 2009, `APISite.recentchanges` was using `rcprop="user|comment|timestamp|title|ids|redirect|patrolled|loginfo|flags"` (it is only slightly different in the current 2016 code), so that commit was reducing the number of rc props being used: it removed `timestamp` and `redirect|patrolled|loginfo|flags`. A comment in that commit says: 1. remove 'patrolled' from rcprop since we can't get it So it seems the main objective of the patch was to remove `patrolled` from the list of requested props. It also avoided requesting unnecessary/unused properties. `user` and `comment` are two additional unused properties that could have removed been removed in that changeset, but were not. They are not needed. Now when we look at `RecentChangesPageGenerator`, we see it is using `APISite.recentchanges`, and `APISite.recentchanges` does not request the `patrolled` prop. So, the main objective of this line in `imageuncat`'s `recentChanges` appears to have been solved in `APISite.recentchanges`. Therefore, imageuncat should be able to use `RecentChangesPageGenerator` without any problem without a modified `rcprop`. **Could you please find the commit which removed the `patrolled` prop from `APISite.recentchanges`? ** However, `RecentChangesPageGenerator` is requesting many other props which are unnecessary as they are not used. RecentChangesPageGenerator` only uses `title` and `type` -- everything else is discarded. So there is a performance improvement which can be made to `RecentChangesPageGenerator`, by setting the rcprop to only include the props which are used. This should be a separate (new) changeset. TASK DETAIL https://phabricator.wikimedia.org/T129193 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: darthbhyrava, jayvdb Cc: Multichill, Mpaa, gerritbot, darthbhyrava, Aklapper, Avicennasis, pywikibot-bugs-list, jayvdb, Lewizho99 _______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs