Project

General

Profile

Actions

Backport #3527

closed

pop3 POPMail.unique_id hangs for large mailboxes - patch included

Added by kbaum (Karl Baum) over 13 years ago. Updated almost 13 years ago.


Description

=begin
Calls to unique_id seem to not return for extremely large mailboxes. I traced this down to the POP3.set_all_uids method. The current implementation is scanning the list of mails for each unique_id resulting in an N * N operation. I modified the method a bit to first build a hash and it seems to have fixed the issue:

 def set_all_uids #:nodoc: internal use only (called from POPMail#uidl)
   number_to_mail = @mails.inject({}) { |hash, mail| hash[mail.number] = mail; hash }
   command().uidl.each do |num, uid|
     number_to_mail[num].uid = uid
   end
 end

=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Open to Assigned
  • Assignee set to shyouhei (Shyouhei Urabe)

=begin
r17430
=end

Actions #2

Updated by shyouhei (Shyouhei Urabe) over 13 years ago

  • Status changed from Assigned to Closed

=begin
fixed in r29903
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0