[Tickets #10615] Re: Locks on initial imp ajax requests

bugs at horde.org bugs at horde.org
Mon Oct 10 04:11:14 UTC 2011


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

Ticket URL: http://bugs.horde.org/ticket/10615
------------------------------------------------------------------------------
  Ticket             | 10615
  Updated By         | Michael Slusarz <slusarz at horde.org>
  Summary            | Locks on initial imp ajax requests
  Queue              | IMP
  Version            | Git master
  Type               | Enhancement
  State              | New
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Michael Slusarz <slusarz at horde.org> (2011-10-09 22:11) wrote:

> What i discovered is that viewPort has the lock on the session and  
> releases it when there's a potential long running operation.  
> Meanwhile, listMailboxes starts executing (because it grabbed the  
> lock on the session), and immediately releases the lock to  
> supposedly perform a long running operation...
> The problem is that as far as i could test, the supposedly long run  
> operation of listMailbox is not long, so it grabs the lock again  
> (before viewPort does), and then it actually runs a potentially long  
> operation (grabbing the list of all the mailboxes from imap, since  
> this is not cachable)..

This is incorrect.  listMailboxes() does all IMAP calls related to  
querying the mailbox tree when the session lock has been released.  By  
the time the session has been re-locked, there should be very little  
(if anything) left to be done on the server (either PHP or IMAP).

That being said... looks like there is a mistake in listMailboxes().   
We are creating the IMP_Imap_Tree object before locking the session.   
If this is the first time we have created the object, init() is  
automatically called.  So we are doing the mailbox listing before we  
even close the session.  This needs to be (and should now be) fixed.
.
> From what i've seen if you completely remove the lock releases from  
> both requests, than viewPort will render much faster, and the user  
> will only notice the loading on the folders sidebar.

This is incorrect.  At least one of these processes is blocking the  
other - so there's no way it can be faster.





More information about the bugs mailing list