From 31ec75b69e02df6330bc16dd2bd48d354726f4c1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 19 Mar 2020 03:32:55 -0500 Subject: daemon: do more immortal allocations up front 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. --- lib/PublicInbox/NNTPD.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/PublicInbox/NNTPD.pm') 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; -- cgit v1.2.3-24-ge0c7