| Xqt added a comment. |
In T137612#4181315, @Dalba wrote:I'm not sure about storing yielded articles in a set. It might hog a lot of memory for large categories.
In pagegenerators we also have such filters where pages are stored in a dict but this doesn't save any memory usage. One idea would be to add the Page._link instead of the whole page which could increase a lot by some attributes. The Page.title() doesn't save memory:
>>> import pwb, pywikibot as py, sys >>> s = py.Site() >>> p = py.Page(s, 'user:Xqt') >>> t = p.title() >>> l = p._link >>> p.__sizeof__() 16 >>> t.__sizeof__() 46 >>> l.__sizeof__() 16 >>> sys.getsizeof(p) 32 >>> sys.getsizeof(t) 46 >>> sys.getsizeof(l) 32
TASK DETAIL
EMAIL PREFERENCES
To: Xqt
Cc: Dalba, gerritbot, pywikibot-bugs-list, Aklapper, AbdealiJK, Zppix, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Baloch007, Darkminds3113, Bsandipan, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Masti, Alchimista, Rxy
Cc: Dalba, gerritbot, pywikibot-bugs-list, Aklapper, AbdealiJK, Zppix, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Baloch007, Darkminds3113, Bsandipan, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
