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/