On 3/20/19 9:42 AM, Clement Verna wrote:
On Wed, 20 Mar 2019 at 14:27, Rick Elrod <codeblock(a)elrod.me>
wrote:
>
> Hi all,
>
> Tahrir is slow, and the endpoint that mediawiki-FedoraBadges uses to get
> its badge count and badge assertion data from takes about 35 seconds per
> request.
Do we have an idea what makes Tahrir so slow ?
Way back when Tahrir was more actively developed, I tried to look into
this some. From what I remember, it's just generating super inefficient
queries, and lots of them. I recall the ORM it was using loves to
generate queries that exhibit the N+1 query problem. When the N queries
are inefficient ones (that might also generate more queries each), the
result is slowness.
But that might have changed, and I haven't touched the Tahrir codebase
in years. As smooge said, there are a number of Tahrir-upstream bugs
that mention it being slow all around, so I don't think this is specific
to the endpoint I'm using. I think this is just where we end up seeing
it fairly often because of wiki userpages.
Rick