about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-10-05 23:47:18 +0000
committerEric Wong <e@80x24.org>2016-10-05 23:52:27 +0000
commitc5b3d2549596b773d52e5feb947f461630dfe301 (patch)
tree1e0e16f857a6736d9d9224c7ac121c59f6e062f3 /lib/PublicInbox/View.pm
parent172416d1cd465da4242cc744a3f309d307f1311d (diff)
downloadpublic-inbox-c5b3d2549596b773d52e5feb947f461630dfe301.tar.gz
Copying large arrays is expensive, so avoid it.
This reduces /$INBOX/ time by around 1%.
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 9f1bf460..e90efda1 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -856,10 +856,10 @@ sub skel_dump {
 }
 
 sub sort_ts {
-        sort {
+        [ sort {
                 (eval { $a->topmost->message->header('X-PI-TS') } || 0) <=>
                 (eval { $b->topmost->message->header('X-PI-TS') } || 0)
-        } @_;
+        } @{$_[0]} ];
 }
 
 sub _tryload_ghost ($$) {