Project

General

Profile

Actions

Patch #37350

closed

Do not load attachments in query list with description and last_notes

Added by Alexander Meindl almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues list
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Currently if you enable description and last notes inline columns in issue list, textilizable loads not required attachments. Attachments are not displayed in this list => it is not required to load it.

This behaviour create lot of not required database queries like:

  Attachment Load (0.4ms)  SELECT `attachments`.* FROM `attachments` WHERE `attachments`.`container_id` = 62115 AND `attachments`.`container_type` = 'Issue' ORDER BY attachments.created_on ASC, attachments.id ASC /*application:RedmineApp,controller:issues,action:index*/
  ↳ app/helpers/application_helper.rb:940:in `+'
  Attachment Load (0.4ms)  SELECT `attachments`.* FROM `attachments` WHERE `attachments`.`container_id` = 62114 AND `attachments`.`container_type` = 'Issue' ORDER BY attachments.created_on ASC, attachments.id ASC /*application:RedmineApp,controller:issues,action:index*/
  ↳ app/helpers/application_helper.rb:940:in `+'
  Attachment Load (0.4ms)  SELECT `attachments`.* FROM `attachments` WHERE `attachments`.`container_id` = 62113 AND `attachments`.`container_type` = 'Issue' ORDER BY attachments.created_on ASC, attachm

The attachment patch solves this problem.


Files

textilizable_without_attachment.patch (951 Bytes) textilizable_without_attachment.patch Alexander Meindl, 2022-06-26 11:48
Actions #1

Updated by Mischa The Evil almost 2 years ago

  • Status changed from New to Needs feedback

Alexander Meindl wrote:

... Attachments are not displayed in this list => it is not required to load it...

This is not true. If image attachments are included in either the description or journals using the respective wiki syntax (!!), the images are rendered in the inline columns in the issue list. See e.g. this query on redmine.org.
This change breaks this behavior.

Actions #2

Updated by Alexander Meindl almost 2 years ago

Hi Mischa The Evil,

you are right! This issue can be closed, sorry for this needless noise.

Actions #3

Updated by Marius BĂLTEANU almost 2 years ago

  • Status changed from Needs feedback to Closed

Closing, thanks for your feedback.

Actions

Also available in: Atom PDF