mozilla / bugzilla-dashboard

This is a bugzilla dashboard that helps management determine Bugzilla components triaging status

Home Page:https://bugzilla-management-dashboard.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bugzilla fetching performance improvement

armenzg opened this issue · comments

In PR #69 we're adding two metrics to the reportees. One of the numbers is the number of assigned bugs and the other one the number of needinfos.

The current implementation makes 2 Bugzilla fetches (1 per metric) per reportee.
Even though each fetch is fast when we have a large number of employees we see the metrics showing up in the UI little by little.

There's also a slow down on the "components" tab, however, it is less noticeable because the user lands on the first tab.

For instance, when loading a director we can have over 100 reportees in their chain of command as well as all the Bugzilla components associated to those reportees. I'm looking at a specific director and I see 122 requests related to reportees metrics and 293 related to Bugzilla components metrics. Transfer size is less than 500kbs, however, loading all data takes about 30 seconds because the browser can only do 6 requests at a time.

@kohei shared some Bugzilla queries that can help in both cases:
https://gist.github.com/kyoshino/d14a37af2ae16c8a4e9761dc7111c66f

We can change the fetching methodology to fetch all bugs assigned in one shot and then process the response. This will be a longer fetch because it won't be using the &count_only=1 trick [1], however, we should be able to make the UI speedier.

For all assigned bugs we can use this search (assigned_to is not empty and &include_fields=id,assigned_to) which has this REST query (The load is actually quite impressive).

For needinfo requests we have this search with this REST query.

We can start improving the reportees tab and then do a pass on the components side (that's why I'm not.

[1] A couple of URLs with &count_only=1; Not using this flag makes those calls longer since there's more data being returned
https://bugzilla.mozilla.org/rest/bug?count_only=1&f1=requestees.login_name&include_fields=cf_last_resolved&include_fields=creation_time&o1=equals&v1=whawkins%40mozilla.com
https://bugzilla.mozilla.org/rest/bug?chfield=%5BBug%20creation%5D&chfieldto=Now&component=Selection&count_only=1&creation_time=2018-06-01&f1=flagtypes.name&include_fields=cf_last_resolved&include_fields=creation_time&o1=notsubstring&priority=--&product=Core&resolution=---&v1=needinfo