user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/2] config: do not implicitly set coderepo.*.cgiturl
  2023-01-08  8:04  5% [PATCH 0/2] coderepo memory savings Eric Wong
@ 2023-01-08  8:04  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-01-08  8:04 UTC (permalink / raw)
  To: meta

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 ($) {

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/2] coderepo memory savings
@ 2023-01-08  8:04  5% Eric Wong
  2023-01-08  8:04  7% ` [PATCH 1/2] config: do not implicitly set coderepo.*.cgiturl Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-01-08  8:04 UTC (permalink / raw)
  To: meta

It'll make Data::Dumper-based debugging nicer, too.

Eric Wong (2):
  config: do not implicitly set coderepo.*.cgiturl
  www_coderepo: do not copy {-code_repos} from config

 lib/PublicInbox/Config.pm      |  1 -
 lib/PublicInbox/WwwCoderepo.pm | 16 +++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-01-08  8:04  5% [PATCH 0/2] coderepo memory savings Eric Wong
2023-01-08  8:04  7% ` [PATCH 1/2] config: do not implicitly set coderepo.*.cgiturl Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).