projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8eb0c33
)
fix perf edge case with multiple large packages not just one, RT#26097
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 7 Jan 2014 05:45:47 +0000
(21:45 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 7 Jan 2014 05:45:47 +0000
(21:45 -0800)
FS/FS/cust_main/Packages.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main/Packages.pm
b/FS/FS/cust_main/Packages.pm
index
e085981
..
7bb3272
100644
(file)
--- 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);