PHP Client lib use igbinary - if not can it?
igbinary is pretty sweet. PHP 1.1 client use it? if not I'd like to request it as a feature. https://github.com/php-memcached-dev/php-memcached uses it today.
https://github.com/igbinary/igbinary/ explains it better than I can:
Igbinary is a drop in replacement for the standard php serializer. Instead of
time and space consuming textual representation, igbinary stores php data
structures in compact binary form. Savings are significant when using
memcached or similar memory based storages for serialized data. About 50%
reduction in storage requirement can be expected. Specific number depends on
your data.
Unserialization performance is at least on par with the standard PHP serializer.
Serialization performance depends on the "compact_strings" option which enables
duplicate string tracking. String are inserted to a hash table which adds some
overhead. In usual scenarios this does not have much significance since usage
pattern is "serialize rarely, unserialize often". With "compact_strings"
option igbinary is usually a bit slower than the standard serializer. Without
it, a bit faster.
Not quite sure what you mean by "Is it possible to use igbinary independently of the library". I'm not quite sure to be honest - ./configure --enable-memcached-igbinary is the only way I've ever done it. I know with the so you'll have access to igbinary_serialize() and igbinary_unserialize() from PHP code scope, but I think for perf reasons you'd want in in your couchbase sdk .so.
However, its super simple to install. igbinary exists in the PECL repo - so its a pecl install igbinary to get the igbinary.so. http://stackoverflow.com/questions/6830260/how-to-enable-igbinary-with-m... is something I wrote up that shows end-to-end, its really pretty easy - and something you guys could script into the makefile a PECL build of the couchbase sdk so (I think).
Do you have a PECL repo entry BTW? I couldn't find one. Much easier for people to maintain vs d/l so or building the so. Would allow you to leverage getcomposer.org/ too.
As for contributing if/when I use couchbase 2.0 I'll look into doing that. Havnen't written c/++ for long time tho.
We have this as a planned improvement, but it's not planned in the near term as you can see in PCBC-33. Of course, any code contributions are gladly accepted.
Is it possible to use igbinary independently of the library? Making this a configure time option doesn't seem so nice, and when we looked into it part of the problem was environment availablility of igbinary support.