Closed Bug 440466 Opened 17 years ago Closed 17 years ago

Remove getAuthors call from getListAddons

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: clouserw, Assigned: wenzel)

Details

Attachments

(1 file)

For performance reasons (and because it's superfluous?) we need to remove this call. Instead of doing this call separately it should be a part of the HABTM relationship between authors and add-ons.
there you go.
Attachment #325788 - Flags: review?(clouserw)
Part of the reason fligtar did it this way was that cake doesn't work well with metadata stored in a map table. In this case addons_users stores the meta for listed/position... so it's not pointless, we should just find a better way I think.
Comment on attachment 325788 [details] [diff] [review] removing getAuthors call, using HABTM association rule adding morgamic to the review list since he is set up to make sure this patch performs well
Attachment #325788 - Flags: review?(morgamic)
Comment on attachment 325788 [details] [diff] [review] removing getAuthors call, using HABTM association rule Functionally, it works for me. My r+ dependent on morgamic's perf testing.
Attachment #325788 - Flags: review?(clouserw) → review+
Comment on attachment 325788 [details] [diff] [review] removing getAuthors call, using HABTM association rule Could you add the appropriate indexes to addons_users as well?
Attachment #325788 - Flags: review?(morgamic) → review-
(In reply to comment #4) > (From update of attachment 325788 [details] [diff] [review]) > My r+ dependent on morgamic's perf testing. Okay let's wait for that. Though I vote for checking this in like this anyway even if it doesn't "dramatically" improve system load, as it's cleaner than what we have now. (Unless of course my patch has a negative impact, which I doubt).
I saw 12k -> 5k for dbsize, so that looks like it has the desired effect.
(In reply to comment #5) > (From update of attachment 325788 [details] [diff] [review]) > Could you add the appropriate indexes to addons_users as well? We already have an index over addon_id and user_id, and adding additional indexes won't make them being used by MySQL.
I tested and everything works fine for me as well - Thanks.
Comment on attachment 325788 [details] [diff] [review] removing getAuthors call, using HABTM association rule Nevermind, index won't help, +r=me
Attachment #325788 - Flags: review- → review+
Thanks, everyone. r16058.
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: push-needed
Resolution: --- → FIXED
Keywords: push-needed
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: