Closed Bug 1379149 Opened 7 years ago Closed 3 years ago

Speed up team permissions page

Categories

(Webtools Graveyard :: Pontoon, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED MOVED

People

(Reporter: mathjazz, Unassigned)

References

Details

Attachments

(1 file)

Team permissions page (pontoon.teams.views:ajax_permissions) is slow.

New Relic Data for the last 7 days
==================================
Apdex: 0.07
Count: 48
Avg: 3,210 ms
SD: 2,360 ms
Min: 47.2 ms
Max: 11,200 ms

Setting priority to P3, as this view is less used than filtering entities (bug 1377099) or contributors dashboards (bug 1357361).
Depends on: 1380349
Blocks: 1397725
:mathjazz
Hey, could you tell me if that performance issue is during GET or POST request? Does The New Relic points to particular queries?
The performance slowness is unrelated to the type of a request.

In my local test I count 47 DB queries which in total take 7.9 seconds to complete.

The contributors query alone takes 7.5 seconds:
https://github.com/mozilla/pontoon/blob/master/pontoon/teams/views.py#L125

I'll take a stab at it with a similar approach used for bug 1357361.
Assignee: nobody → m
Commit pushed to master at https://github.com/mozilla/pontoon

https://github.com/mozilla/pontoon/commit/5a7f766a3cc39fd436539db56ce04396ff3de2df
Bug 1379149: Optimize Contributors query (#806)

* Bug 1379149: Optimize Contributors query
Assignee: m → ryan
Seems like the problem with this view is not so much with the sql. Although the queries are not optimal, they are taking up no more than ~25% of the total time to render.

The problem with this view is that it creates lists of all users in the site multiple times. This takes a long time for django to render the template, transfers a ton of data, and soaks the users browser memory.

Ideally the fix for this is to not dump the user lists like this, and instead to use something like select2 to select the users over ajax

For reference the most problematic part of the render is here https://github.com/mozilla/pontoon/blob/master/pontoon/teams/templates/teams/includes/permissions.html#L62:L65
Assignee: ryan → nobody
*This bug has been moved to GitHub.*

*Please check it out on https://github.com/mozilla/pontoon/issues.*
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → MOVED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: