[Tickets #11983] Re: limit synced mailboxes by user preferences

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Jan 21 16:51:58 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/11983
------------------------------------------------------------------------------
  Ticket             | 11983
  Updated By         | Michael Rubinsky <mrubinsk at horde.org>
  Summary            | limit synced mailboxes by user preferences
  Queue              | Synchronization
  Version            | Git master
  Type               | Enhancement
  State              | Feedback
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


Michael Rubinsky <mrubinsk at horde.org> (2013-01-21 16:51) wrote:


> If I had to call _getMailFolder() for every folder returned by  
> _imap->getMailboxes(), wouldn't this get too expensive? My list may  
> well be longer than 1k entries... each tme creating an instance of  
> Horde_ActiveSync_Message_Folder, calling getSpecialMailboxes() etc,  
> and then dumping the result in all but a handful of cases.

Well, getSpecialMailboxes() already caches the list so we only hit the  
imap server once.

> Purely functionally speaking, the quickest approach would be to call  
> _imap->getSpecialMailboxes() only once, re-map to an "folder  
> name"-based array, then check every "_imap->getMailboxes()" result  
> against that new array. Does that sound acceptable to you?

Feel free to submit a patch and I'll review.





More information about the bugs mailing list