On Tue, Nov 08, 2005 at 09:54:18AM +0200, Ilkka Huotari wrote:
It depends on the server you're running and the connection that server has to the IMAP server. For example the Demo-Installation has the IMAP server right next to it (LAN) and speed seems OK to me.
You are right, the problem turned out to be the network latency and nothing more. Local (to the webserver) servers work very well.
Connections are persistent for the time the script runs. A connection is established the first time needed and will be closed when the script ends. Since PHP is a scripting language and the process ends when reaching the end of the script it's not possible to keep up a connection during the whole session. But I don't think that connecting to the IMAP server is what takes much time.
Maybe it's a minor thing after all. And since there doesn't seem to be anything for this, for example in PHP's imap library, I guess it's not a big problem... but I guess it would be possible to do it at that level.
For this reason there are a few IMAP proxy daemons that will maintain and reuse existing IMAP connections. They do make a difference. I use the one from http://www.imapproxy.org/