vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r18465: LJSUP-8073: Compressed email's texts in ...

Committer: vsukhanov
LJSUP-8073: Compressed email's texts in TheSchwartz
U   trunk/cgi-bin/ljmail.pl
Modified: trunk/cgi-bin/ljmail.pl
===================================================================
--- trunk/cgi-bin/ljmail.pl	2011-03-03 10:37:44 UTC (rev 18464)
+++ trunk/cgi-bin/ljmail.pl	2011-03-03 10:41:41 UTC (rev 18465)
@@ -235,11 +235,15 @@
         $coalesce = lc($2) . '@' . lc($1);   # we store it reversed in database
     }
 
+    ## reduce memory usage on TheSchwartz clusters
+    my $compressed_text = Compress::Zlib::memGzip($text);
+
     my $job = TheSchwartz::Job->new(funcname => "TheSchwartz::Worker::SendEmail",
                                     arg      => {
                                         env_from => $from,
                                         rcpts    => $rcpts,
-                                        data     => $text,
+                                        data     => $compressed_text,
+                                        compressed => 1,
                                     },
                                     coalesce => $coalesce,
                                     );

Tags: livejournal, pl, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments