From d33fae954f99c7241be5ef6d6447db9bdc6d648d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 10 Jun 2020 07:05:16 +0000 Subject: imapd: don't bother sorting LIST output The sort was unstable on my test instance anyways, and clients don't seem to mind. So stop wasting CPU cycles. --- lib/PublicInbox/IMAPD.pm | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib') diff --git a/lib/PublicInbox/IMAPD.pm b/lib/PublicInbox/IMAPD.pm index fe50de0f..09bedf5c 100644 --- a/lib/PublicInbox/IMAPD.pm +++ b/lib/PublicInbox/IMAPD.pm @@ -74,11 +74,6 @@ sub imapd_refresh_finalize { my $u = $_; # capitalize "INBOX" for user-familiarity $u =~ s/\Ainbox(\.|\z)/INBOX$1/i; qq[* LIST (\\Has${no}Children) "." $u\r\n] - } sort { - # shortest names first, alphabetically if lengths match - length($a) == length($b) ? - ($a cmp $b) : - (length($a) <=> length($b)) } keys %$mailboxes ]; $imapd->{pi_config} = $pi_config; -- cgit v1.2.3-24-ge0c7