[Tickets #8805] expanded_folders preference makes user unable to login

bugs at horde.org bugs at horde.org
Tue Dec 29 02:38:59 UTC 2009


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

Ticket URL: http://bugs.horde.org/ticket/8805
------------------------------------------------------------------------------
  Ticket             | 8805
  Created By         | pguiran at linagora.com
  Summary            | expanded_folders preference makes user unable to login
  Queue              | IMP
  Version            | 4.3.5
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              | 1
  Owners             |
+New Attachment     |  
horde-webmail-1.2.4-lng3_patch-expanded_folders_managment.patch
------------------------------------------------------------------------------


pguiran at linagora.com (2009-12-28 21:38) wrote:

Hi,

One of my user have problems to login into horde and it seems that the  
problem is from the 'expanded_folders' preference. In fact, its  
'expended_folder' preference in database may grown up with horde's  
upgrades, or with an unknown problem. Its 'expanded_folder' preference  
contain more than 1000 elements (old, unused, etc... elements) !

When the user login into horde, 'expanded_folders' is loaded from  
database, IMAP connects to the imap server, receives list of mailbox,  
makes modifications into 'expanded_folders' and store it into database  
and session. All those operations take lot of time, and the webserver  
connection is timeout or the web client close the connection due to  
timeout. So the user can't login.

The problem is that at each modification of 'expanded_folder',  
serialize + Prefs_sql::setValue() are called, which take lots of time.  
In fact, the call chain is : serialize -> Prefs_sql::setValue() ->  
Prefs::_setValue() -> Prefs_sql::convertToDriver() ->  
String::convertCharset() on a 150KB string :-(

I attach to this ticket a patch :
  * modify IMAP_Tree::_modifyExpandedList() -> track modification of  
$this->_expanded instead of the modification of the serialization of  
$this->_expanded
  ** add: if the value modified was in $this->_expanded, the  
Prefs_sql::isDurty( 'expanded_folders', true ) is called
  ** del: call of Prefs_sql::setValue() and of serialize()
  * modifify IMAP_Tree::_store()
  ** add: track modification of $this->_expanded and save it if necessary
  ** add: call of $this->_cleanExpandedList()
  * IMAP_Tree::_cleanExpandedList()
  ** only work when $this->_fulllist is not null, ie when the class  
has had a connection with the imap server
  ** try to clean $this->_expanded by removing useless entries.

I attach more information about tests files etc... in reply to this ticket.

Patrick,

ps : Sorry for my bad english :(






More information about the bugs mailing list