Closed
Bug 961719
Opened 10 years ago
Closed 10 years ago
Remove fields we don't need in Webapp._meta.translated_fields
Categories
(Marketplace Graveyard :: Code Quality, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
2014-01-28
People
(Reporter: mat, Assigned: mat)
References
Details
(Whiteboard: [qa-])
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•10 years ago
|
Assignee: nobody → mpillard
Priority: -- → P2
Assignee | ||
Updated•10 years ago
|
Priority: P2 → P3
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•10 years ago
|
||
Fixed in https://github.com/mozilla/zamboni/commit/bbf00814785910f4c07013ce2cd99e9a6cb61719
Status: ASSIGNED → RESOLVED
Closed: 10 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.
Description
•