Make watching GNOME bugs more efficient by doing just one buglist.cgi request

Bug #6667 reported by Olav Vitters
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Björn Tillenius

Bug Description

Malone currently watches Bugzilla bugs by using buglist.cgi very inefficiently. It makes a request for every bug. This takes 1 - 10 seconds _per_ bug. For all bugs this takes about 6 minutes total. Malone says there it watches 101 GNOME bugs, so 3.5 sec average per bug.

Malone should just do one buglist.cgi request.

Currently it requests:
http://bugzilla.gnome.org/buglist.cgi?bug_id=321366&form_name=buglist.cgi&ctype
=rdf&bug_id_type=include

It should combine the bug numbers with ",", like:
http://bugzilla.gnome.org/buglist.cgi?bug_id=321366,163163&form_name=buglist.cgi&ctype
=rdf&bug_id_type=include

Bugzilla allows you to use POST (handy when you have a lot of bug numbers).

Tags: lp-bugs
Revision history for this message
Christian Reis (kiko) wrote : Re: [Bug 6667] Make watching GNOME bugs more efficient by doing just one buglist.cgi request

Fixing this will be interesting -- the current externalsystem.py code
is built with the assumption that it will handle one bug at a time --
get_bug_status accepts a single bug_id as an argument, and that's what
issues the buglist.cgi request. To fix this we need to factor out most
of the code in checkwatches.py and move it all into a single
ExternalSystem.update_watch_status() call -- instantiating one per
bugtracker we want to check.

Olav Vitters (ovitters)
description: updated
Revision history for this message
James Henstridge (jamesh) wrote :

It'd probably be worth looking at reworking the status update code to be multithreaded: sort the bug watches to be updated into queues (one per bugtracker), and have a thread for each queue.

This would be faster for us too, without adding more load on the remote bug trackers.

Revision history for this message
Stuart Bishop (stub) wrote :

I've disabled the checkwatches.py script on production on recommendation by seb128. It isn't nice to DOS the Gnome bugzilla every day.

Brad Bollenbach (bradb)
Changed in malone:
status: Unconfirmed → Confirmed
Changed in malone:
assignee: nobody → bjornt
Changed in malone:
status: Confirmed → In Progress
Changed in malone:
status: In Progress → Fix Committed
Dafydd Harries (daf)
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.