From: Ivan Kohler Date: Tue, 7 Jan 2014 05:30:51 +0000 (-0800) Subject: fix perf edge case with multiple large packages not just one, RT#26097 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=9bca6157d6ae81eaacb4eee93757d700240a6de7;hp=5bb3332639ffadd71b00ad41fd2a7cbb038092ab;p=freeside.git fix perf edge case with multiple large packages not just one, RT#26097 --- diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index 57c4e5249..3c96fc733 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -333,8 +333,8 @@ sub sort_packages { return 0 if !$a_num_cust_svc && !$b_num_cust_svc; return -1 if $a_num_cust_svc && !$b_num_cust_svc; return 1 if !$a_num_cust_svc && $b_num_cust_svc; - my @a_cust_svc = $a->cust_svc; - my @b_cust_svc = $b->cust_svc; + my @a_cust_svc = $a->cust_svc_unsorted; + my @b_cust_svc = $b->cust_svc_unsorted; return 0 if !scalar(@a_cust_svc) && !scalar(@b_cust_svc); return -1 if scalar(@a_cust_svc) && !scalar(@b_cust_svc); return 1 if !scalar(@a_cust_svc) && scalar(@b_cust_svc);