Closed Bug 1436985 Opened 2 years ago Closed 8 months ago

Speed up locale queries

Categories

(Webtools :: Pontoon, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ryan, Assigned: codewithaniruddha, Mentored)

Details

Attachments

(1 file)

looking at new relic, the most expensive queries overall are starting from the locale table (for sync) and are ordering name, code.

It seems that the ordering is what is making this so expensive, and there is a related (Bug 1394194) to make ordering code only.

This may/not make the query fast as i have other indeces in play and i havent yet tested ordering only by code with these queries...
...but certainly by either removing the ordering altogether, or making it code only with some indeces will take a large percentage of these queries, and strain from the db.
on further testing having no ordering at all is much faster, indeces dont seem to count for much here.

As ordering can be done in python relatively easily (with the caveat that python unicode sort !== db unicode sort) it seems like a good idea to just do the sort in python
Priority: -- → P3
Summary: Optimize locale queries → Speed up locale queries
Assignee: nobody → vishaliitr7
Mentor: ryan
Assignee: vishaliitr7 → nobody
Mentor: ryan → m

hey @mathjazz, can you please assign this bug to me.

Assignee: nobody → rv404674
Status: NEW → ASSIGNED

Hey @mathjazz due to my college exams I will not be able to complete this patch. So please can you please mark it's status to new again.

Assignee: rv404674 → nobody
Status: ASSIGNED → NEW
Assignee: nobody → codewithaniruddha
Status: NEW → ASSIGNED

It turned out there aren't any performance wins here:
https://github.com/mozilla/pontoon/pull/1193#issuecomment-464713267

Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.