[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 3eb9352aabb1e04711bd233fbeed468fe3736aa0
Ivan
ivan at 420.am
Mon Jan 6 21:45:49 PST 2014
The branch, FREESIDE_2_3_BRANCH has been updated
via 3eb9352aabb1e04711bd233fbeed468fe3736aa0 (commit)
from 9bca6157d6ae81eaacb4eee93757d700240a6de7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 3eb9352aabb1e04711bd233fbeed468fe3736aa0
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Jan 6 21:45:48 2014 -0800
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 3c96fc7..9fdf22e 100644
--- a/FS/FS/cust_main/Packages.pm
+++ b/FS/FS/cust_main/Packages.pm
@@ -333,6 +333,7 @@ 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;
+ return 0 if $a_num_cust_svc + $b_num_cust_svc > 20; #for perf, just give up
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);
-----------------------------------------------------------------------
Summary of changes:
FS/FS/cust_main/Packages.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
More information about the freeside-commits
mailing list