I've put some high resolution timestamping into the code and found
some interesting things.
Am example ticket that took 10 seconds to render spent 8.17 seconds in
the
while ( my $Transaction = $Transactions->Next ) {
loop inside ShowHistory:
Apr 28 16:10:05 calypso RT: After Transaction Loop - time taken:
8.172556 (/opt/rt3/local/html/Ticket/Elements/ShowHistory:151)
So then I put some logging in ShowTransaction
Each INIT takes milliseconds (so I think we can discount that):
Apr 28 16:10:05 calypso RT: <- ShowTransaction INIT - time taken:
0.006261 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:253)
But each Body of ShowTransaction takes between 0.03 and 0.15 seconds eg:
Apr 28 16:09:59 calypso RT: After show transaction - time taken:
0.130829 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:102)
Apr 28 16:09:59 calypso RT: After show transaction - time taken:
0.038523 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:102)
Apr 28 16:10:00 calypso RT: After show transaction - time taken:
0.033974 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:102)
Apr 28 16:10:00 calypso RT: After show transaction - time taken:
0.027394 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:102)
Apr 28 16:10:00 calypso RT: After show transaction - time taken:
0.030395 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:102)
Apr 28 16:10:00 calypso RT: After show transaction - time taken:
0.005656 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:102)
Apr 28 16:10:00 calypso RT: After show transaction - time taken:
0.030067 (/opt/rt3/local/html/Ticket/Elements/ShowTransaction:102)
So multiply that for 100 comments + 100 other transactions (status
changes etc) and it's easy to see where the time goes...
Justin
On 28 Apr 2009, at 16:06, Raed El-Hames wrote:
> Justin;
>
> One of the other things I done here is to hide show summary by
> default, as I noticed the ShowSummary and in particular
> <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &> (Thats the
> box that shows Other ticket by requestor etc)
> was taking a long time to render
>
> If you can play and test in your system try to comment out
> <& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments
> => $attachments &>
>
> see if ticket loading is quicker,
> remember to restart apache after you do the change ..
>
> I am on 3.6.3 and some of our monitoring tickets are over 300
> updates long .. having been through the pain you having, I tried all
> possible options
>
> Roy
>
>
> Justin Hayes wrote:
>> Thanks for the advice Roy, but I think I'd already tried that at
>> some point in the past:
>>
>> <tr>
>> <td colspan="4" class="content <%perl> $m->print('hidden') if
>> $Collapsed==2;</%perl>" id="txn-body-<%$Transaction->id%>">
>> %# if ($Transaction->CustomFieldValues->Count) {
>> %# <& /Elements/ShowCustomFields, Object => $Transaction &>
>> %# }
>> % $m->comp('ShowTransactionAttachments', %ARGS, Parent => 0)
>> unless ($Collapsed==1 ||!$ShowBody);
>> </td>
>> </tr>
>>
>> Justin
>>
>> On 28 Apr 2009, at 11:00, Raed El-Hames wrote:
>>
>>
>>> Justin;
>>>
>>> I 've had similar slow loading tickets in the past, and it turned
>>> out (in my case) the problem was with transactions custom fields,
>>> do you use those?? if you don't you can comment out the
>>> following lines from Ticket/Elements/ShowTransaction
>>>
>>> 65 % if ($Transaction->CustomFieldValues->Count) {
>>> 66 <& /Elements/ShowCustomFields, Object => $Transaction &>
>>> 67 % }
>>>
>>> The numbers you see there are the line numbers
>>>
>>> Roy
>>>
>>>
>>> Justin Hayes wrote:
>>>
>>>> Hi,
>>>>
>>>> Some of our tickets can get pretty long and the longer they get
>>>> the longer the page takes to load. So for a long ticket with
>>>> say 100 comments/replies and assorted status changes etc it
>>>> might take 10+ seconds to render.
>>>>
>>>> A lot of the time seems to be looping over every transaction,
>>>> checking permissions etc etc, I guess maybe to decide whether
>>>> to display the reply/comment options and other things.
>>>>
>>>> Have any improvements been made to the history display code in
>>>> 3.8? I would have thought it was more sensible to check
>>>> permissions once for the ticket and then quickly render all the
>>>> attachments, but I'm sure that's a simplistic view of it.
>>>>
>>>> Any thoughts welcome!
>>>>
>>>> Justin
>>>>
>>>> -------------------------------------------------
>>>> Justin Hayes
>>>> Orbis Support Manager
>>>> [email protected]
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>>>
>>>> Community help: http://wiki.bestpractical.com
>>>> Commercial support: [email protected]
>>>>
>>>>
>>>> Discover RT's hidden secrets with RT Essentials from O'Reilly
>>>> Media. Buy a copy at http://rtbook.bestpractical.com
>>>>
>>>>
>>
>>
>> -------------------------------------------------
>> Justin Hayes
>> Orbis Support Manager
>> [email protected]
>>
>>
>>
>>
>>
-------------------------------------------------
Justin Hayes
Orbis Support Manager
[email protected]
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [email protected]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com