HomePhabricator

Cache the stats object in Redis between updates

Tags
None
Referenced Files
None
Subscribers
None

Description

Cache the stats object in Redis between updates

inteGraality has never been particularly fast,
but this is understandable because it does a lot
(a NxM SPARQL queries [with N=#groupings and M=#properties]).

The queries (aka looking glass) feature, however, does comparatively
very little: using Pywikibot to read the find the wikipage, read the
config from the template, generate hyperlinks to two SPARQL queries, done.

Yet, it can be excruciatingly slow. The reason for it is that the page
read are heavily throttled by the MediaWiki API every time the Query Service
is lagging behind (which is pretty much all the time these days).

Here, the parameters of the stats object are stored in Redis
when they’re created, and used if already there.

The cache is invalidated when an update of the page is triggered.

Bug: T245210

Details

Provenance
JeanFredAuthored on Mar 25 2020, 8:39 AM
Parents
R2566:9d5e608e074e: Switch to Python3.7 as default interpreter
Branches
Unknown
Tags
Unknown
ChangeId
None