From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D6C0C1F47D for ; Sun, 8 Jan 2023 08:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1673165062; bh=Ra8n89WnKwg7t9nlLSwUJncnWXUzr53R72VFVgFuABE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Buj0wvTDFmZ6OEvGFEJnGdNhnFjzVv75L2UKns5jFSx9NorK0fHJSQGntNglz4TVr 1Fg1pflEi57X8acXk/a6bZIlho4QpoELTzcrzQI4dd/ShOhuIUYGeZL3bDC7MdPxrW kRWwNxzmlZOFjLIza3sgzQoPlaVOTsSHzB1lT5v8= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] config: do not implicitly set coderepo.*.cgiturl Date: Sun, 8 Jan 2023 08:04:12 +0000 Message-Id: <20230108080413.4160826-2-e@80x24.org> In-Reply-To: <20230108080413.4160826-1-e@80x24.org> References: <20230108080413.4160826-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It's a needless waste of memory and this change reduces the WwwCoderepo object size by over 25% with over 1K repos. Using the following check: perl -MDevel::Size=total_size -I lib -MPublicInbox::WwwCoderepo -E \ 'say total_size(PublicInbox::WwwCoderepo->new(PublicInbox::Config->new))' before: 1612515 after: 1184385 --- lib/PublicInbox/Config.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 174c75ef..c48ab2bd 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -226,7 +226,6 @@ sub cgit_repo_merge ($$$) { $rel =~ s!/?\.git\z!!; } $self->{"coderepo.$rel.dir"} //= $path; - $self->{"coderepo.$rel.cgiturl"} //= _array($rel); } sub is_git_dir ($) {