diff options
author | Eric Wong <e@80x24.org> | 2020-12-23 08:38:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-23 23:46:42 +0000 |
commit | 83a03a80c7392148fa65143f60fb16d15cf19006 (patch) | |
tree | 923efe19c061c8b27d92bf165622f9625972e888 /lib/PublicInbox/Config.pm | |
parent | 6f9b927bf1fc5e84b92532477b275a45cd30cb01 (diff) | |
download | public-inbox-83a03a80c7392148fa65143f60fb16d15cf19006.tar.gz |
Using substr() instead of a string copy + s// substitution here reduces ->fill_all from 4.00s to 3.88s with 50K inboxes on my workstation.
Diffstat (limited to 'lib/PublicInbox/Config.pm')
-rw-r--r-- | lib/PublicInbox/Config.pm | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 577337dc..cd8957a1 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -424,9 +424,7 @@ EOF } } - my $name = $pfx; - $name =~ s/\Apublicinbox\.//; - + my $name = substr($pfx, length('publicinbox.')); if (!valid_inbox_name($name)) { warn "invalid inbox name: '$name'\n"; return; |