[Rt-commit] rt branch, 4.0/bin-rt-ls-too-much, created. rt-4.0.21rc1-1-g0a89060
Kevin Falcone
falcone at bestpractical.com
Sat Jul 12 14:18:38 EDT 2014
The branch, 4.0/bin-rt-ls-too-much has been created
at 0a89060cbea7fba75f7429412d9e6ce074e2b599 (commit)
- Log -----------------------------------------------------------------
commit 0a89060cbea7fba75f7429412d9e6ce074e2b599
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Sat Jul 12 14:13:45 2014 -0400
Don't ask for every field if you only want seven
When 'rt ls' is run in prettyprint mode (the default with no additional
arguments, or no specified fields), it flips on the long format, which
goes and gets a ton of fields, including, all the custom fields on each
ticket. If you have a lot of open tickets, this adds up to extra data
fetches and extra data over the wire which is then thrown away by
prettyprint().
Additionally, this is terribler on RTIR, which has some slow ACL checks
around custom fields and Queues, and the long format gets all the CFs
for each ticket. There is caching, but clearly it's not enough if you
have 100 open tickets. Relevant commits from rtir.git:1f5fb2a9 but that
cache still isn't enough. We'll do more digging in RTIR, but this takes
a list of a 100 RTIR tickets from minutes to 2 seconds.
diff --git a/bin/rt.in b/bin/rt.in
index 480f178..83c38ac 100644
--- a/bin/rt.in
+++ b/bin/rt.in
@@ -322,6 +322,7 @@ sub list {
}
if ( ! $rawprint and ! exists $data{format} ) {
$data{format} = 'l';
+ $data{fields} = 'subject,status,queue,created,told,owner,requestors';
}
if ( $reverse_sort and $data{orderby} =~ /^-/ ) {
$data{orderby} =~ s/^-/+/;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list