]> Sergey Matveev's repositories - public-inbox.git/commit
config: do not slurp entire cgitrc at once
authorEric Wong <e@yhbt.net>
Sat, 11 Jan 2020 22:34:55 +0000 (22:34 +0000)
committerEric Wong <e@yhbt.net>
Mon, 13 Jan 2020 04:36:36 +0000 (04:36 +0000)
commit7778d7abd5acb2ba7c32de10cec1369f3982bf84
tree3131247fbea2919caba3afeae57954bb0d9722a3
parentea5c81fb5c45d75528de81b91019af58782e2d91
config: do not slurp entire cgitrc at once

cgitrc files can have hundreds or thousands of lines in them and
slurping them into memory is a waste.  "while (<$fh>)" only
reads one line at a time, whereas "for (<$fh>)" reads the entire
contents of the file into a temporary array.
lib/PublicInbox/Config.pm