REST vs GUI: huge performance diference

Hey folks. I’m using rt 4.02 via REST and I noticed a surprising difference
in performance between using the RT web GUI where a certain query takes
less than one second and the RT command line where the same query takes
close to four seconds.

rt ls ‘requestor=someuser@example.com’ (takes 3+ seconds)
rt web UI quick search for someuser@example.com (takes < 1 second)

That user has 133 tickets. If I do this for a user with 6 tickets then both
methods are essentially instant.

What’s going on here?

thanks!
ram

Hey folks. I’m using rt 4.02 via REST and I noticed a surprising
difference in performance between using the RT web GUI where a certain
query takes less than one second and the RT command line where the same
query takes close to four seconds.

rt ls ‘requestor=someuser@example.com mailto:someuser@example.com
(takes 3+ seconds)
rt web UI quick search for someuser@example.com
mailto:someuser@example.com (takes < 1 second)

That user has 133 tickets. If I do this for a user with 6 tickets then
both methods are essentially instant.

What’s going on here?

Allow me to paste from #rt:

14:00 <@trs> ram: the quick search on the web automatically limits to active
statuses.
14:00 <@trs> ram: rt ls doesn’t if you specify a query
14:00 <@trs> try rt ls 'requestor=someuser@example.com and (status=new or status=open or status=stalled)'
14:00 <@trs> or similar

Please wait a reasonable time for a response before asking in multiple mediums.

After using a few tools suggested by Tom (MasonX::Profiler and then
NYTProf) it looks to me like the issue imay be in
share/html/REST/1.0/Forms/ticket/default and really relates to a difference
in the default (fields) in GUI quick search compared to what the REST
servicer does.

By changing my query from (the CLI equivalent): rt ls
"Requester.EmailAddress=someaddy@example.com" to rt ls -f Created, Status,
LastUpdated, Subject "Requestor.EmailAddress=someaddy@example.com" I saw a
round trip time reduction of over 70%.

This change in request was enough to bring the performance of the REST
interface within a reasonable range for my needs.

Hope this helps.
ramOn 06/11/2013 01:42 PM, Ram wrote:

Hey folks. I’m using rt 4.02 via REST and I noticed a surprising
difference in performance between using the RT web GUI where a certain
query takes less than one second and the RT command line where the same
query takes close to four seconds.

rt ls ‘requestor=someuser@example.com mailto:someuser@example.com
(takes 3+ seconds)
rt web UI quick search for someuser@example.com
mailto:someuser@example.com (takes < 1 second)

That user has 133 tickets. If I do this for a user with 6 tickets then
both methods are essentially instant.

What’s going on here?

Allow me to paste from #rt:

14:00 <@trs> ram: the quick search on the web automatically limits to
active
statuses.
14:00 <@trs> ram: rt ls doesn’t if you specify a query
14:00 <@trs> try rt ls 'requestor=someuser@example.com and (status=new or status=open or status=stalled)'
14:00 <@trs> or similar