enter_bug.cgi should use Bugzilla::Product::preload to preload product attributes such as flags

ASSIGNED
Assigned to

Status

()

ASSIGNED
7 years ago
7 years ago

People

(Reporter: dkl, Assigned: dkl)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
enter_bug.cgi should call Bugzilla::Product::preload similar to how it is called already in other places to allow preloading of attributes such as components, versions, milestones and flags. Flags particularly as create.html.tmpl calls component.flag_types for each component in product.components. This causes a call to Bugzilla::FlagType::match for every component. product.flag_types will preload all of it's components flag types, but product.flag_types is not called til later in the template. Calling Bugzilla::Product::preload in enter_bug.cgi will call product.flag_types before the template is loaded which will save each of the individual calls to Bugzilla::FlagType::match in component.flag_types.

Patch coming.
dkl
(Assignee)

Comment 1

7 years ago
Created attachment 582943 [details] [diff] [review]
Patch to add Bugzilal::Product::preload to enter_bug.cgi (v1)
Attachment #582943 - Flags: review?(LpSolit)
(Assignee)

Comment 2

7 years ago
Comment on attachment 582943 [details] [diff] [review]
Patch to add Bugzilal::Product::preload to enter_bug.cgi (v1)

Need to rework this as it has turned up an issue on BMO with version sorting on enter_bug.cgi. preload() causes the values to be sorted differently than if the accessors for each attribute were called separately.

dkl
Attachment #582943 - Flags: review?(LpSolit)
You need to log in before you can comment on or make changes to this bug.