diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-01-06 21:45:45 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-01-06 21:45:45 -0800 |
commit | e08dc441d98b98643d5108ce8c189fcf12693e0c (patch) | |
tree | 312eaacb3bedef46c560bdd33695b66c44088341 /FS/FS/cust_main/Packages.pm | |
parent | fda4176a713fac94af01af665f6ac94bb14ea5c9 (diff) |
fix perf edge case with multiple large packages not just one, RT#26097
Diffstat (limited to 'FS/FS/cust_main/Packages.pm')
-rw-r--r-- | FS/FS/cust_main/Packages.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index 847ac05..9899bd0 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -501,6 +501,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); |