Closed Bug 855619 Opened 12 years ago Closed 11 years ago

Theme Edit is slow to POST

Categories

(addons.mozilla.org Graveyard :: Code Quality, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX
2013-07-25

People

(Reporter: cvan, Unassigned)

References

()

Details

After POSTing the server takes a while to get back to us. It's tough to tell what the bottleneck is. Consider doing EditThemeForm.save()'s logic in a task or something: https://github.com/mozilla/zamboni/blob/master/apps/addons/forms.py#L651 Here are our saves: [Min, Max] Query Model ---------- ------ ------------- 1. [1, 1] UPDATE Addon 2. [0, 1] UPDATE Persona 3. [0, +Inf) INSERT Tag 4. [0, +Inf) DELETE Tag 5. [0, 1] UPDATE AddonCategory
task seems excessive for this since we want it to respond right away. We should figure out what is slow and fix that.
Priority: -- → P2
We can do all of this asynchronously with a Celery task. If the slug has changed, we should redirect to the edit URL with that new slug, and we'll assume everything got inserted/updated/deleted without any issues. I can get behind that.
Target Milestone: --- → 2013-04-04
Status: NEW → ASSIGNED
Assignee: nobody → cvan
Why would you do this asynchronously? Editing live data is one of the main reasons to do this real time. If we don't, you end up with all the weird caching problems we had in AMO, or special cases to make those problems not show up. Isn't it way easier just to make sure the inserts are fast? We should figure out why queries are slow - they could be slowing other things down too.
Not sure what is actually slow here - I'm actually being kind of smart and saving only when the columns change value. To investigate later.
Status: ASSIGNED → NEW
Target Milestone: 2013-04-04 → ---
Assignee: cvan → ngoke
Here are some timings on my local server, just from clicking Save without editing any data on the form. --------LOADED FORM 0:00:00.013743 --------SAVED PERSONA 0:00:00.000046 --------SAVED ADDON OBJECT 0:00:00.071135 --------ADDED NEW TAGS 0:00:00.002261 --------REMOVED OLD TAGS 0:00:00.000009 --------UPDATED CATEGORY 0:00:00.002190
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-07-18
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 2013-07-18 → 2013-07-25
I'm posting a 30x speedup locally (.0800s vs .0025s zomg) when the add-on itself is not modified on POST. Doesn't affect it on -dev though. -dev seems to still take 4 seconds from clicking the button to the page finish loading. Might not be a direct code issue.
Assignee: kngo → nobody
Thanks for filing this. Due to resource constraints we are closing bugs which we won't realistically be able to fix. If you have a patch that applies to this bug please reopen. For more info see http://micropipes.com/blog/2014/09/24/the-great-add-on-bug-triage/
Status: REOPENED → RESOLVED
Closed: 12 years ago11 years ago
Resolution: --- → WONTFIX
Thanks for filing this. Due to resource constraints we are closing bugs which we won't realistically be able to fix. If you have a patch that applies to this bug please reopen. For more info see http://micropipes.com/blog/2014/09/24/the-great-add-on-bug-triage/
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.