Zend Framework

copying many messages is slow: copy() in Zend_Mail_Protocol_Imap should support array of message ids

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: 1.9.6
  • Fix Version/s: None
  • Component/s: Zend_Mail_Storage
  • Labels:
    None

Description

If I want to copy 1000 messages, I have to call the copyMessage() method in Zend_Mail_Storage_Imap 1000 times. This is really slow. The same applies to moveMessage().

Both methods internally use the copy() method of Zend_Mail_Protocol_Imap. This method supports a single id or a range of ids, but this is not used. So it would be nice if copy() would support an array of ids (which is then joined to a comma-separated string), because this is supported by IMAP.

This functionality is already supported by fetch(), and I provided a patch for store() in ZF-8488 . I will attach a patch for the copy() method (which is the same as in fetch() or store()).

Then it is easy to create a function in Zend_Mail_Storage_Imap which supports copying or moving of many messages with one IMAP command, which is very fast then.

The $from ist also missing in phpDoc comment for copy() method.

Issue Links

Activity

Hide
Satoru Yoshida added a comment -

Correct component

Show
Satoru Yoshida added a comment - Correct component

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: