Remove fields we don't need in Webapp._meta.translated_fields

RESOLVED FIXED in 2014-01-28

Status

Marketplace
Code Quality
P3
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mat, Assigned: mat)

Tracking

2014-01-28
x86_64
Linux
Points:
---

Details

(Whiteboard: [qa-])

(Assignee)

Description

4 years ago
The translation app uses <model>._meta.translated_fields to know which fields are translation fields on a model, to fetch them dynamically for each instance in each db query made (in the transformer).

For Webapps, because we inherit from Addon, we have (in mkt/webapps/models.py):
# Pull all translated_fields from Addon over to Webapp.
Webapp._meta.translated_fields = Addon._meta.translated_fields

But there are some Addon fields that we don't care about at all in Marketplace. We should remove those fields Webapp._meta.translated_fields to avoid processing them, they'll always be NULL anyway. This would make the SQL queries generated by the translations app in Marketplace a little less verbose, and hopefully very slightly improve performance (less useless joins to try to make for the db)
(Assignee)

Updated

4 years ago
Assignee: nobody → mpillard
Priority: -- → P2
(Assignee)

Updated

4 years ago
Priority: P2 → P3
(Assignee)

Updated

4 years ago
Blocks: 926640
(Assignee)

Updated

4 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

4 years ago
Fixed in https://github.com/mozilla/zamboni/commit/bbf00814785910f4c07013ce2cd99e9a6cb61719
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Target Milestone: --- → 2014-01-28
You need to log in before you can comment on or make changes to this bug.