diff options
author | Eric Wong <e@80x24.org> | 2020-12-17 06:54:41 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-19 09:32:08 +0000 |
commit | 50ce71e698e038e643d81d9f5948e002384b5898 (patch) | |
tree | d69320e3a8c2165e7d135e1ae24a6a57d27cf8e6 /lib/PublicInbox/TestCommon.pm | |
parent | 193e86164403dc0d43e7dc44ee68272897727f81 (diff) | |
download | public-inbox-50ce71e698e038e643d81d9f5948e002384b5898.tar.gz |
We'll use lower-level Socket and avoid IO::Socket::UNIX, use Cwd::fastcwd(*), avoid IO::Handle->autoflush by using the select operator, and reuse buffer for reading the socket while avoiding unnecessary $/ localization in a tiny script. All these things adds up to ~5-10 ms savings on my loaded system. (*) caveats about fastcwd won't apply since lei won't work in removed directories.
Diffstat (limited to 'lib/PublicInbox/TestCommon.pm')
-rw-r--r-- | lib/PublicInbox/TestCommon.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index c236c589..338e760c 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -261,6 +261,7 @@ sub run_script ($;$$) { my $orig_io = _prepare_redirects($fhref); _run_sub($sub, $key, \@argv); _undo_redirects($orig_io); + select STDOUT; } # slurp the redirects back into user-supplied strings |