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





--- Comment #8 from Roan Kattouw <[email protected]>  2009-07-13 12:51:01 
UTC ---
(In reply to comment #7)
> (In reply to comment #6)
> > (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?
> > 
> Yes, I think that would be the correct place.
Yes, refactoring core code to be more API-friendly is almost always a good
thing.

> > > * 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.
> > 
> If it's in the special page then it should probably be ok.
> 
Yeah, if the UI does it, have no fear of doing it in the API as well.


-- 
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