Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Bugzilla queries #23

Open
harthur opened this issue Jul 12, 2013 · 1 comment
Open

Optimize Bugzilla queries #23

harthur opened this issue Jul 12, 2013 · 1 comment

Comments

@harthur
Copy link
Contributor

harthur commented Jul 12, 2013

There are 5 Bugzilla queries and some of them take years. Should look into what could make them faster, and maybe offload some logic to the client-side.

@edmorley
Copy link
Contributor

(CC @globau)

Currently bugzilla todos does... (s/username%40mozilla.com/foo/)

~ "To review" tab...
13:15:29.891 GET https://api-dev.bugzilla.mozilla.org/latest//bug [HTTP/1.1 200 OK 1170ms]
https://api-dev.bugzilla.mozilla.org/latest//bug?field0-0-0=flag.requestee&type0-0-0=contains&value0-0-0=username%40mozilla.com&status=NEW&status=UNCONFIRMED&status=REOPENED&status=ASSIGNED&include_fields=id%2Csummary%2Cstatus%2Cresolution%2Clast_change_time%2Cattachments

~ "To check" in & "to nag" tab...
13:15:29.891 GET https://api-dev.bugzilla.mozilla.org/latest//bug [HTTP/1.1 200 OK 7271ms]
-> https://api-dev.bugzilla.mozilla.org/latest//bug?field0-0-0=attachment.attacher&type0-0-0=equals&value0-0-0=username%40mozilla.com&field0-1-0=whiteboard&type0-1-0=not_contains&value0-1-0=fixed&field0-2-0=flagtypes.name&type0-2-0=substring&value0-2-0=review%2B&status=NEW&status=UNCONFIRMED&status=REOPENED&status=ASSIGNED&include_fields=id%2Csummary%2Cstatus%2Cresolution%2Clast_change_time%2Cattachments

~ "To check" in & "to nag" tab...
13:15:29.891 GET https://api-dev.bugzilla.mozilla.org/latest//bug [HTTP/1.1 200 OK 3575ms]
-> https://api-dev.bugzilla.mozilla.org/latest//bug?field0-0-0=flag.setter&type0-0-0=equals&value0-0-0=username%40mozilla.com&field0-0-1=attachment.attacher&type0-0-1=equals&value0-0-1=username%40mozilla.com&field0-1-0=flagtypes.name&type0-1-0=contains&value0-1-0=%3F&status=NEW&status=UNCONFIRMED&status=REOPENED&status=ASSIGNED&include_fields=id%2Csummary%2Cstatus%2Cresolution%2Clast_change_time%2Cflags%2Cattachments

~ "To fix" tab... (I'm presuming we subtract the bugs from the previous tabs, from the results here)
13:15:29.892 GET https://api-dev.bugzilla.mozilla.org/latest//bug [HTTP/1.1 200 OK 3557ms]
-> https://api-dev.bugzilla.mozilla.org/latest//bug?email1=username%40mozilla.com&email1_type=equals&email1_assigned_to=1&field0-1-0=whiteboard&type0-1-0=not_contains&value0-1-0=fixed&order=changeddate%20DESC&status=NEW&status=UNCONFIRMED&status=REOPENED&status=ASSIGNED&include_fields=id%2Csummary%2Cstatus%2Cresolution%2Clast_change_time%2Cattachments%2Cdepends_on

~ "To respond" tab... (guessing [all requests minus those on "to review" tab]
13:15:29.892 GET https://api-dev.bugzilla.mozilla.org/latest//bug [HTTP/1.1 200 OK 1293ms]
-> https://api-dev.bugzilla.mozilla.org/latest//bug?field0-0-0=flag.requestee&type0-0-0=equals&value0-0-0=username%40mozilla.com&include_fields=id%2Csummary%2Cstatus%2Cresolution%2Clast_change_time%2Cflags

Then for each bug found, a separate call to retrieve the bug meta (no params specified), eg:
13:15:33.924 GET https://api-dev.bugzilla.mozilla.org/latest//bug/787449 [HTTP/1.1 200 OK 776ms]
13:15:33.925 GET https://api-dev.bugzilla.mozilla.org/latest//bug/832008 [HTTP/1.1 200 OK 730ms]
13:15:33.925 GET https://api-dev.bugzilla.mozilla.org/latest//bug/928911 [HTTP/1.1 200 OK 730ms]
13:15:33.926 GET https://api-dev.bugzilla.mozilla.org/latest//bug/928962 [HTTP/1.1 200 OK 692ms]
13:15:33.926 GET https://api-dev.bugzilla.mozilla.org/latest//bug/928964 [HTTP/1.1 200 OK 699ms]
13:15:33.926 GET https://api-dev.bugzilla.mozilla.org/latest//bug/928965 [HTTP/1.1 200 OK 1107ms]

At the least we should:

  1. Specify include_fields for the per-bug requests.
  2. Combine the per-bug requests into one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants