Closed Bug 880097 Opened 11 years ago Closed 11 years ago

Only retrieve database fetched values if requested

Categories

(Bugzilla :: WebService, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 4.4

People

(Reporter: mail, Assigned: mail)

Details

(Keywords: perf)

Attachments

(1 file, 2 obsolete files)

As part of BRC's review of RPC performance, we found that there were some values that were being retrieved from the database, even if they were not requested. While each call takes less than a millisecond, when you are retrieving tens of thousands of bugs, retrieving unwanted information can lead to a significant delay.
Attached patch v1 patch (obsolete) — Splinter Review
Well that was a little embarrassing. Most of the database based values are BRC customisations (e.g. for multiple aliases). Nonetheless, there were three calls that use database calls.

  -- simon
Attachment #758952 - Flags: review?(glob)
Comment on attachment 758952 [details] [diff] [review]
v1 patch

r=glob
Attachment #758952 - Flags: review?(glob) → review+
Flags: approval?
Flags: approval4.4?
Comment on attachment 758952 [details] [diff] [review]
v1 patch

>         classification   => $self->type('string', $bug->classification),

Why isn't classification also included in a filter_wants check? It also requires an extra DB call.
Severity: enhancement → minor
Flags: approval?
Flags: approval4.4?
Comment on attachment 758952 [details] [diff] [review]
v1 patch

lpsolit pointed out that classification should get the same treatment.
Attachment #758952 - Flags: review+ → review-
Attached patch v2 patch (obsolete) — Splinter Review
Attachment #761204 - Flags: review?(glob)
Attachment #758952 - Attachment is obsolete: true
Comment on attachment 761204 [details] [diff] [review]
v2 patch

r=glob
Attachment #761204 - Flags: review?(glob) → review+
Flags: approval?
Flags: approval4.4?
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval+
Keywords: perf
Target Milestone: --- → Bugzilla 4.4
Attached patch v3 patchSplinter Review
Oh dear. Don't know how I missed the blooper in the last patch.
Attachment #761204 - Attachment is obsolete: true
Attachment #763306 - Flags: review?(glob)
Comment on attachment 763306 [details] [diff] [review]
v3 patch

r=glob
Attachment #763306 - Flags: review?(glob) → review+
$ bzr commit --fixes mozilla:880097
Committing to: bzr+ssh://bmo/bugzilla/4.4/                                     
modified Bugzilla/WebService/Bug.pm
Committed revision 8570.                                                       

Committing to: bzr+ssh://bmo/bugzilla/trunk/                                   
modified Bugzilla/WebService/Bug.pm
Committed revision 8639.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to Simon Green from comment #9)
> Committing to: bzr+ssh://bmo/bugzilla/4.4/                                  

Hum, this shortcut means that revision numbers are no longer linkifed.
(In reply to Frédéric Buclin from comment #10)
> (In reply to Simon Green from comment #9)
> > Committing to: bzr+ssh://bmo/bugzilla/4.4/                                  
> 
> Hum, this shortcut means that revision numbers are no longer linkifed.

Yeah, sorry about that. Byron pointed that out to me too.

http://logbot.glob.com.au/?c=mozilla%23bugzilla&s=17%20Jun%202013&e=17%20Jun%202013#c1279400

I've updated my ssh config file so that future commits should be linkified.

  -- simon
You need to log in before you can comment on or make changes to this bug.