https://bugzilla.wikimedia.org/show_bug.cgi?id=19004





--- Comment #6 from Gurch <[email protected]>  2009-07-12 21:12:33 
UTC ---
(In reply to comment #4)
> ApiQueryTags seems to duplicate a lot of code from SpecialTags. I think that
> one common backend should be written, from which both the API and the special
> page fetch their data, rather than duplicating code in them both.

Agreed, I was trying to touch as little stuff as possible. Would that go in
includes/ChangeTags.php?

> * You're querying the change_tag table using GROUP BY and COUNT(*). This is
> probably inefficient, so I recommend using valid_tags instead if at all
> possible

Here I did things the same way the special page does them. Not doing the
group/count stuff loses the hit counts, which to be honest aren't all that
important, and could be done away with. Is the output of Special:Tags cached?
If so I guess that would explain the potentially expensive query.

> * I don't see enough context in the patch, but you should test the LEFT JOINs
> you've added to make sure they don't try to join against the wrong table

Everything works when I test it, this is only on a tiny wiki though.

> Also, 'end' is undocumented

That would be because I forgot to remove it :)


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to