]> Sergey Matveev's repositories - public-inbox.git/commit
config: git_config_dump: pre-compile RE for split
authorEric Wong <e@80x24.org>
Wed, 23 Dec 2020 08:38:51 +0000 (08:38 +0000)
committerEric Wong <e@80x24.org>
Wed, 23 Dec 2020 23:46:43 +0000 (23:46 +0000)
commit80424a6a72dbe2b1ea7ba9bfba8f273e4da385a7
tree674ed4cba02dfe3bc9965b9f6f7b58cc9e1ee68e
parent83a03a80c7392148fa65143f60fb16d15cf19006
config: git_config_dump: pre-compile RE for split

It appears the Perl split() operator is not optimized for fixed
strings at all.  With this change, PublicInbox::Config->new (w/o
->fill_all) time is reduced from 1.81s to 1.22s on a config file
with 50K inboxes.
lib/PublicInbox/Config.pm