[rt-devel] superfluous query for ticket links for merged ticket id's

Christian Loos cloos at netcologne.de
Thu Feb 25 03:05:42 EST 2016


Am 23.02.2016 um 19:23 schrieb Shawn Moore:
> I think you’re right. The code to consult merged tickets for links was added first, in 2002, here:
> 
> https://github.com/bestpractical/rt/commit/6020dac5c3487e41eb9a0a5203a617f9793e8c61#diff-07fe0337ce0b1c48d62516cb36bb3e33R2205
> 
> The code to move links on merge was added later, in 2003:
> 
> https://github.com/bestpractical/rt/commit/53ea76636e0e288bdebf2f9a6cdac63bdce8ef47#diff-07fe0337ce0b1c48d62516cb36bb3e33R2814
> 
> I suspect the latter change indeed made the former obsolete, but since it wasn’t breaking anything, no one ever toucheed it. I too think we can remove it.

I think this could in some situations, slightly improve the performance
of the ticket search results page.
As you can add linked tickets to the ticket search result, this leads to
one additional query for each ticket, with the default search limit of
50, this are 50 additional queries.

In my case, this is more worse, because I created a custom report where
I have to inspect the links for 1000 tickets, so there are 1000
additional queries. :-(

So maybe this is something that is worth to go into RT 4.2?!

Should I send a PR or will you put this on your TODO list?

Chris



More information about the rt-devel mailing list