Clicking on message generate two requests:
"GET /?_task=mail&_action=preview&_uid=414&_mbox=Spam&_framed=1 HTTP/1.1" 304 26 "POST /?_task=mail&_action=mark HTTP/1.1" 200 205
and one login to imap server for each. I think such "related actions" should be done with one imap connection and one request.
On Thu, Mar 20, 2008 at 9:25 AM, A.L.E.C alec@alec.pl wrote:
Clicking on message generate two requests:
"GET /?_task=mail&_action=preview&_uid=414&_mbox=Spam&_framed=1 HTTP/1.1" 304 26 "POST /?_task=mail&_action=mark HTTP/1.1" 200 205
and one login to imap server for each. I think such "related actions" should be done with one imap connection and one request.
Yes, and no. Keep in mind, PHP is not very good with persistence. At least not across multiple requests.
I agree that we should (and I think we do) recycle objects/connections during a single request, but your example shows two different things. It's hard to add that layer of persistence in a scripting language, especially since the GC in PHP is done at the end of each script run.
If you are that concerned about IMAP connections your best bet is to look into imapproxy (1). (Website looks down, but I know that imapproxy is in every other linux/unix distro, so you should have no problem installing it and getting docs.)
Till
1, http://imapproxy.org _______________________________________________ List info: http://lists.roundcube.net/dev/
till wrote:
On Thu, Mar 20, 2008 at 9:25 AM, A.L.E.C alec@alec.pl wrote:
Clicking on message generate two requests: "GET /?_task=mail&_action=preview&_uid=414&_mbox=Spam&_framed=1 HTTP/1.1" 304 26 "POST /?_task=mail&_action=mark HTTP/1.1" 200 205
Yes, and no. Keep in mind, PHP is not very good with persistence. At least not across multiple requests.
I agree that we should (and I think we do) recycle objects/connections during a single request, but your example shows two different things. It's hard to add that layer of persistence in a scripting language, especially since the GC in PHP is done at the end of each script run.
Hi Till, I don't think it's about persisting connections between requests, it's about saving requests - in the above case if a mail is opened for preview this same request should also mark it to be read (what the second request is for). This will save one request between client and server and one db connection attempt and one IMAP connection request on the server.
Michael Baierl http://mbaierl.com/
Nie vergessen: Egal was du auch tust, es gibt mindestens Tausend Menschen, die besser sind als du! _______________________________________________ List info: http://lists.roundcube.net/dev/
On Thu, Mar 20, 2008 at 10:51 AM, Michael Baierl mail@mbaierl.com wrote:
till wrote:
On Thu, Mar 20, 2008 at 9:25 AM, A.L.E.C alec@alec.pl wrote:
Clicking on message generate two requests: "GET /?_task=mail&_action=preview&_uid=414&_mbox=Spam&_framed=1 HTTP/1.1" 304 26 "POST /?_task=mail&_action=mark HTTP/1.1" 200 205
Yes, and no. Keep in mind, PHP is not very good with persistence. At least not across multiple requests.
I agree that we should (and I think we do) recycle objects/connections during a single request, but your example shows two different things. It's hard to add that layer of persistence in a scripting language, especially since the GC in PHP is done at the end of each script run.
Hi Till, I don't think it's about persisting connections between requests, it's about saving requests - in the above case if a mail is opened for preview this same request should also mark it to be read (what the second request is for). This will save one request between client and server and one db connection attempt and one IMAP connection request on the server.
Maybe. I think the behavior is from that when you click "unread/read" the same action is triggered. Code is being re-used - that's all. If you guys wanna open a ticket and identify more of those issues and maybe even submit a patch, go ahead. :)
Till _______________________________________________ List info: http://lists.roundcube.net/dev/
Michael Baierl wrote:
I don't think it's about persisting connections between requests, it's about saving requests - in the above case if a mail is opened for preview this same request should also mark it to be read (what the second request is for). This will save one request between client and server and one db connection attempt and one IMAP connection request on the server.
Exactly, I wasn't thinking about persistent connections, but about doing "related actions" in one request.
A.L.E.C wrote:
Clicking on message generate two requests:
"GET /?_task=mail&_action=preview&_uid=414&_mbox=Spam&_framed=1 HTTP/1.1" 304 26 "POST /?_task=mail&_action=mark HTTP/1.1" 200 205
and one login to imap server for each. I think such "related actions" should be done with one imap connection and one request.
I've made a patch for that, but I'm not shure it's good and only solution of discussed idea. Trying to learn your code, but need confirmation for that.
A.L.E.C wrote:
I've made a patch for that, but I'm not shure it's good and only solution of discussed idea. Trying to learn your code, but need confirmation for that.
the same patch with one fix
A.L.E.C wrote:
A.L.E.C wrote:
I've made a patch for that, but I'm not shure it's good and only solution of discussed idea. Trying to learn your code, but need confirmation for that.
the same patch with one fix
so, guys, no reply means my patch was approved? ;)
On Mon, Apr 7, 2008 at 1:41 PM, A.L.E.C alec@alec.pl wrote:
A.L.E.C wrote:
A.L.E.C wrote:
I've made a patch for that, but I'm not shure it's good and only solution of discussed idea. Trying to learn your code, but need confirmation for that.
the same patch with one fix
so, guys, no reply means my patch was approved? ;)
I haven't had time to look. Is there a ticket? :O
Till _______________________________________________ List info: http://lists.roundcube.net/dev/
till wrote:
I haven't had time to look. Is there a ticket? :O
I've open a ticket for you ;) http://trac.roundcube.net/ticket/1484972
There're two patches. One described in that thread and one for quotadisplay, which also increases performance. Performance issues are very important to me, as I plan to use roundcube for up to 2000 users on my newly configured server and want to make more investigation for performance improvements. Of course, in the worst case i'll use imapproxy, but roundcube's code improvements should go first.
On Wed, Apr 9, 2008 at 8:23 AM, A.L.E.C alec@alec.pl wrote:
till wrote:
I haven't had time to look. Is there a ticket? :O
I've open a ticket for you ;) http://trac.roundcube.net/ticket/1484972
There're two patches. One described in that thread and one for quotadisplay, which also increases performance. Performance issues are very important to me, as I plan to use roundcube for up to 2000 users on my newly configured server and want to make more investigation for performance improvements. Of course, in the worst case i'll use imapproxy, but roundcube's code improvements should go first.
I agree. Also, 2000 users were not an issue for me so far.
I changed some things on devel-vnext such as a registry and lots of php5 stuff, but I don't think my changes were so fundamental <> trunk.
Till _______________________________________________ List info: http://lists.roundcube.net/dev/