about summary refs log tree commit homepage
path: root/lib/PublicInbox/WWW.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-08-22 08:00:37 +0000
committerEric Wong <e@80x24.org>2015-08-22 08:01:53 +0000
commit1761fba7befab2681276ac8f123593610ad27e58 (patch)
tree2725fdbd3691a8f00310e9e9ebf96de2deb321ca /lib/PublicInbox/WWW.pm
parent797ba8046562864a09ed36e6040055babb536615 (diff)
downloadpublic-inbox-1761fba7befab2681276ac8f123593610ad27e58.tar.gz
We will attempt to generate Atom feeds "by hand" as the
XML::Atom::SimpleFeed API does not support streaming output.
Since email is large and servers are small, this should prevent
wasting memory when we generate larger feeds.

Of course, we hope clients use SAX parsers capable of handling
large streams without slurping.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r--lib/PublicInbox/WWW.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index 54f63991..30a7a436 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -81,7 +81,6 @@ sub preload {
         require Email::MIME;
         require Digest::SHA;
         require POSIX;
-        require XML::Atom::SimpleFeed;
 
         eval {
                 require PublicInbox::Search;
@@ -120,11 +119,10 @@ sub invalid_list_mid {
 # /$LISTNAME/atom.xml                       -> Atom feed, includes replies
 sub get_atom {
         my ($ctx, $cgi) = @_;
-        require PublicInbox::Feed;
         $ctx->{pi_config} = $pi_config;
         $ctx->{cgi} = $cgi;
-        [ 200, [ 'Content-Type' => 'application/xml' ],
-          [ PublicInbox::Feed->generate($ctx) ] ]
+        require PublicInbox::Feed;
+        PublicInbox::Feed::generate($ctx);
 }
 
 # /$LISTNAME/?r=$GIT_COMMIT                 -> HTML only