[freeside-commits] freeside/httemplate/view/cust_main packages.html, 1.50, 1.51
Ivan,,,
ivan at wavetail.420.am
Sun Mar 29 17:32:05 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv9832/httemplate/view/cust_main
Modified Files:
packages.html
Log Message:
part_pkg caching should speedup display of lots of packages, RT#5083
Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- packages.html 29 Mar 2009 23:44:12 -0000 1.50
+++ packages.html 30 Mar 2009 00:32:03 -0000 1.51
@@ -76,6 +76,7 @@
<TH CLASS="grid" BGCOLOR="#cccccc">Services</TH>
</TR>
+% my %part_pkg = ();
% foreach my $cust_pkg (@$packages) {
%
% if ( $bgcolor eq $bgcolor1 ) {
@@ -84,12 +85,18 @@
% $bgcolor = $bgcolor1;
% }
%
+% $part_pkg{$cust_pkg->pkgpart} ||= $cust_pkg->part_pkg;
+% $cust_pkg->{'_pkgpart'} ||= $part_pkg{$cust_pkg->pkgpart}; #XXX cache kludge
+%
% my %iopt = (
% 'bgcolor' => $bgcolor,
% 'cust_pkg' => $cust_pkg,
-% 'part_pkg' => $cust_pkg->part_pkg,
+% 'part_pkg' => $part_pkg{$cust_pkg->pkgpart},
% %conf_opt,
% );
+%
+% my $oldDEBUG = $FS::cust_pkg::DEBUG;
+% $FS::cust_pkg::DEBUG = 2;
<!--pkgnum: <% $cust_pkg->pkgnum %>-->
<TR>
@@ -101,6 +108,8 @@
<% include('packages/services.html', %iopt) %>
</TR>
+% $FS::cust_pkg::DEBUG = $oldDEBUG;
+
% }
</TABLE>
More information about the freeside-commits
mailing list