]> Sergey Matveev's repositories - public-inbox.git/commitdiff
linkify: compile $LINK_RE once
authorEric Wong <e@yhbt.net>
Sat, 25 Jan 2020 04:45:03 +0000 (04:45 +0000)
committerEric Wong <e@yhbt.net>
Mon, 27 Jan 2020 02:59:09 +0000 (02:59 +0000)
This gives a 3-4% performance improvement in xt/perf-msgview.t
with a mirror of https://public-inbox.org/meta/

lib/PublicInbox/Linkify.pm

index af9be3ff1632be1d8f7ede077f982c55501a782e..77b94f56af4fc104789ed76ce58483afbd98fd38 100644 (file)
@@ -70,7 +70,7 @@ sub linkify_1 {
 
                $_[0]->{$key} = $url;
                $beg . 'PI-LINK-'. $key . $end;
-       ^ge;
+       ^geo;
        $_[1];
 }