Opened 8 years ago
Closed 8 years ago
#38514 closed enhancement (fixed)
Comment form performs a lot of unused logic when not open for comments
Reported by: | jipmoors | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Comments | Keywords: | has-patch |
Focuses: | performance | Cc: |
Description
The comment_form
function performs a lot of data preparation and logic, but when the current object is closed for comments it will not use anything and just trigger an action.
Suggesting to move the check to the start of the function, thus reducing complexity and increasing performance.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
I was confused by the diff because everything has been shifted. It looks like a lot of changes but it's just an indentation change.