Project

General

Profile

Actions

Patch #44386

open

Avoid N+1 queries generated by Webhook#setable_projects

Added by Marius BĂLTEANU about 6 hours ago. Updated about 4 hours ago.

Status:
Resolved
Priority:
Normal
Category:
Performance
Target version:

Description

Extracted from #44337:

Vincent Robert wrote:

The patch also resolves a performance issue by changing one line in Webhook#setable_projects (N+1 queries when filtering lots of projects)


Related issues

Related to Redmine - Feature #44337: Add an administration page listing all webhooksNewActions
Actions #1

Updated by Marius BĂLTEANU about 6 hours ago

  • Status changed from New to Resolved

Committed the performance fix, thanks!

Actions #2

Updated by Marius BĂLTEANU about 4 hours ago

Holger Just wrote in #note-9:

We should also drop the to_a there. Instead, in the before_validation hook we could just pluck the IDs and compare it to the ids of the hook's proposed projects.

Committed this change in r25011.

Actions #3

Updated by Marius BĂLTEANU about 4 hours ago

  • Related to Feature #44337: Add an administration page listing all webhooks added
Actions

Also available in: Atom PDF