From: Thomas O. <tho...@or...> - 2012-03-07 00:36:21
|
Am Tue, 06 Mar 2012 20:04:22 +0100 schrieb Tim Gerundt <ti...@ge...>: > Sorry, I hit submit before I was finished! ;) > > Are you sure, that "opening server" and "DONE opening server" not both > belongs to the imap_open() call? For me it looks like, that "DONE > opening server" starts at 17:31:29 and 17:31:57 "num_msg" can call. That's the code: error_log("ThOr: opening server: ".$this->server); $conn = @imap_open('{'.$this->server.'}'.$this->folder, $this->login, $this->passwd, 0); error_log("ThOr: DONE opening server: ".$this->server); So that in the log... [Tue Mar 06 17:31:28 2012] [error] [client x] ThOr: opening server: bla [Tue Mar 06 17:31:29 2012] [error] [client x] ThOr: DONE opening server: bla Does mean that the call to imap_open didn't need more than one second, doesn't it? I might be wrong, I'm just transferring my knowledge from other programming languages. > A quick and dirty benchmark looks in PHP like this: > > $starttime = microtime(true); > // ... > // ... do PHP stuff you will benchmark ... > // ... > // ... > $endtime = microtime(true); > var_dump($endtime - $starttime); Where would that output go? I prefer it showing up in the apache logs, hence error_log seemed fine (also as there are timestamps). > > Is imap_open() really slow for you? > > I echoed the time before and after the imap_open() call and it was more > the 10 seconds. That is interesting. Are we having two different issues here? Or am I wrong about when error_log messages get sent to apache? Trying again with that code: error_log("ThOr: opening server: ".$this->server); $begin = microtime(true); $conn = @imap_open('{'.$this->server.'}'.$this->folder, $this->login, $this->passwd, 0); $end = microtime(true); error_log("ThOr: DONE opening server: ".$this->server); error_log("needed time:".($end-$begin)); [Wed Mar 07 01:30:34 2012] [error] [client x] ThOr: opening server: bla [Wed Mar 07 01:30:34 2012] [error] [client x] ThOr: DONE opening server: bla [Wed Mar 07 01:30:34 2012] [error] [client x] needed time:0.0717890262604, bla [Wed Mar 07 01:31:02 2012] [error] [client x] ThOr: num_msg, bla [Wed Mar 07 01:31:02 2012] [error] [client x] ThOr: num_msg, bla [Wed Mar 07 01:31:04 2012] [error] [client x] ThOr: num_msg, bla So I need to dig around what happens in between... are we really talking about the same line of code in class_local.php? > Yes, the plain HTML/CSS layout, no database need and the POP3 support > make NOCC different to the big player like RoundCube or SquirrelMail. Well, if I keep using it, I will have a look at that JavaScript code that is there, but it doesn't seem to be that important. For one, there is the "invert selection" (Invertiere Auswahl) button that doesn't work without. Well, for non-scripters, a "select all" button would be nice as addition. Well, small things, not hard to do. Alrighty then, Thomas. |