Closed
Bug 967607
Opened 10 years ago
Closed 10 years ago
User.get shouldn't load data that requires extra database queries unless required
Categories
(Bugzilla :: WebService, enhancement)
Bugzilla
WebService
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: glob, Assigned: glob)
Details
(Keywords: perf)
Attachments
(1 file)
2.12 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
Bug.user currently loads all data about a user, even if not requested, which is then filtered prior to being returned. this has performance implications, especially for the user autocompletion. on bmo, performing a user search for 'mco' results in 2829 database queries, taking approx 2 seconds on my development environment. after fixing the code so it calls filter_wants, this drops to 17 queries taking approx 750ms.
Comment 1•10 years ago
|
||
What is Bug.user??? I cannot find it upstream.
Updated•10 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Summary: Bug.user shouldn't load data that requires extra database queries unless required → User.get shouldn't load data that requires extra database queries unless required
Attachment #8370150 -
Flags: review?(dkl)
Comment 4•10 years ago
|
||
Comment on attachment 8370150 [details] [diff] [review] 967607_1.patch Review of attachment 8370150 [details] [diff] [review]: ----------------------------------------------------------------- Nit-pick about the line lengths being > 80 columns but otherwise works properly. r=dkl
Attachment #8370150 -
Flags: review?(dkl) → review+
Updated•10 years ago
|
Flags: approval?
Updated•10 years ago
|
Flags: approval? → approval+
Updated•10 years ago
|
Severity: normal → enhancement
Target Milestone: --- → Bugzilla 5.0
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/WebService/User.pm Committed revision 8908.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•