Slow connect with PHP SDK
Tue, 01/31/2012 - 06:58
Hi,
I just tried installing couchbase 1.8 on a 64-bit Debian machine and also the 1.0.0-beta SDK library according to these instructions (http://www.couchbase.com/develop/php/current). I have created a test Couchbase bucket on a dedicated port. And I copied and modified the test code:
$cb = new Couchbase("127.0.0.1:8091", null, null, "test");
$cb->set("a", 1);
var_dump($cb->get("a"));When I run this it's kind of slow, so I put markers in the code to debug and it's the connecting time that is taking between 100-800 ms (first row). When I try the using the memcached PHP extension on the dedicated port it's connecting in under a millisecond. Is it supposed to be this slow or am I doing anything wrong?
Thanks
Hi Marcus,
sorry for the late reply.
The PHP SDK now supports persistent connections by default, so only the first connection per process should be slower, all other ones should be about 2x the speed of ext/memcached.
Cheers
Jan
--