Summary | Locks on initial imp ajax requests |
Queue | IMP |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | goncalo.queiros (at) portugalmail (dot) net |
Created | 10/07/2011 (5078 days ago) |
Due | |
Updated | 10/10/2011 (5075 days ago) |
Assigned | |
Resolved | 10/10/2011 (5075 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
Ticket #10615: folder tree should be initialized when session is closed1 files changed, 1 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/356a745f048df0d62b5734e7f3bf11eb78f26e07
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.
.
both requests, than viewPort will render much faster, and the user
will only notice the loading on the folders sidebar.
other - so there's no way it can be faster.
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Locks on initial imp ajax requests
Type ⇒ Enhancement
State ⇒ New
While this requests are fast, the problem that im describing here is
negligible, but when you introduce lag on the imap server, there's
evidences that the listMailbox request will lock the session, thus
dragging the viewPort request with it.
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).. Meanwhile viewport ends processing and it has
to wait for the session to be unlocked before it can continue..
The problem is very noticeable, when you have lag to the imap server
(viewPort will generally retrieve its data from cache, so the lag is
not important to it) while listMailboxes doesn't cache its result, so
every folder will actually take some time to fetch.
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.
Bug #7422is the one responsible for introducing the lock releasing,but i think that back then, listMailbox supposedly long run operation
was actually between the unlock/lock, and now it isn't.