about summary refs log tree commit homepage
path: root/lib/PublicInbox/NNTPD.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-03-19 03:32:55 -0500
committerEric Wong <e@yhbt.net>2020-03-20 18:24:21 +0000
commit31ec75b69e02df6330bc16dd2bd48d354726f4c1 (patch)
treef4d5d763e6b8b65bf3a19abc10ffa13eb5f54adb /lib/PublicInbox/NNTPD.pm
parenta7c58d0ce022671c9170401054a1131b9ec15bfa (diff)
downloadpublic-inbox-31ec75b69e02df6330bc16dd2bd48d354726f4c1.tar.gz
Doing immortal allocations late can cause those allocations
to end up in places where it fragments the heap.  So do more
things up front for long-lived daemons.
Diffstat (limited to 'lib/PublicInbox/NNTPD.pm')
-rw-r--r--lib/PublicInbox/NNTPD.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/PublicInbox/NNTPD.pm b/lib/PublicInbox/NNTPD.pm
index 7a917169..451f4d41 100644
--- a/lib/PublicInbox/NNTPD.pm
+++ b/lib/PublicInbox/NNTPD.pm
@@ -45,6 +45,10 @@ sub refresh_groups () {
                         # Only valid if msgmap and search works
                         $new->{$ngname} = $ng;
                         push @list, $ng;
+
+                        # preload to avoid fragmentation:
+                        $ng->description;
+                        $ng->base_url;
                 }
         });
         @list =        sort { $a->{newsgroup} cmp $b->{newsgroup} } @list;