Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Pierre Joye
On Sep 23, 2014 8:07 PM, "Leigh" wrote: > > On 23 September 2014 17:36, Park Framework wrote: > > > > If you do not update in PHP 7 serialization method, it will never be > > updated, the default serialization in PHP 7 will be slow. > > > > To maintain backward compatibility, can implement suppor

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Stas Malyshev
Hi! > There is an even better way to do this; add an additional parameter to > serialize and unserialize to serialize as and unserialize as: > > $bin = serialize($data_struct, 'igbinary'); > $data_struct = unserialize($bin, 'igbinary'); This is cleaner, but if you can do this (code change), why

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Kalle Sommer Nielsen
Hi 2014-09-23 23:56 GMT+02:00 Park Framework : > In php.ini add the directive > serialization.method = msgpack / Igbinary / There is an even better way to do this; add an additional parameter to serialize and unserialize to serialize as and unserialize as: $bin = serialize($data_struct, 'ig

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Park Framework
I agree, you're right. My desire to override the existing algorithm serialize(), due to the need to change the method serialization, but does not change the source code (legacy code, ext PHP) 2014-09-24 3:03 GMT+03:00 Stas Malyshev : > Hi! > >> Perhaps a compromise would be to choose the quickest

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Stas Malyshev
Hi! > Perhaps a compromise would be to choose the quickest method of > serialization, add it to PHP core. > > In php.ini add the directive > serialization.method = msgpack / Igbinary / We could, but what if you need to read/write data specifically from current PHP serializer? You'd have to

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Park Framework
> Why break anything? If you need faster serializer, it's quite easy to > get one, including msgpack. If it is really an issue that is important > for people, we could include the package into core. But I don't see > breaking BC in serialize/unserialize as a big win here. If it's really a > bottlen

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Rowan Collins
On 23 September 2014 12:17:35 GMT+01:00, Park Framework wrote: >Performance testing, Msgpack VS Igbinary > >igbinary: -20% slower, data size ~5% > As with any benchmark, the details of the test are rather important. Firstly, some data structures may be better handled than others, or be targeted

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Stas Malyshev
Hi! > I clearly didn't google, it would be interesting to see comparisons of high > speed PHP serialization libraries. I for one would be happy, in PHP 7, to > break BC serialization syntax in favour of putting in a much faster > serializer by default. Similar scenario to putting in Zend OpCache b

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Leigh
On 23 September 2014 17:36, Park Framework wrote: > > If you do not update in PHP 7 serialization method, it will never be > updated, the default serialization in PHP 7 will be slow. > > To maintain backward compatibility, can implement support method calls > on primitive types, new algorithms for

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Andrey Andreev
On Tue, Sep 23, 2014 at 7:36 PM, Park Framework wrote: >> Not really, not because it is not good but because there is always be a >> better one. We can't break format in every release. > > If you do not update in PHP 7 serialization method, it will never be > updated, the default serialization in

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Park Framework
> Not really, not because it is not good but because there is always be a > better one. We can't break format in every release. If you do not update in PHP 7 serialization method, it will never be updated, the default serialization in PHP 7 will be slow. To maintain backward compatibility, can im

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Pierre Joye
On Sep 23, 2014 3:31 PM, "Paul Dragoonis" wrote: > > I clearly didn't google, it would be interesting to see comparisons of high speed PHP serialization libraries. I for one would be happy, in PHP 7, to break BC serialization syntax in favour of putting in a much faster serializer by default. Simi

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Rowan Collins
Park Framework wrote (on 23/09/2014): PHP serialization is slowest in PHP Session, clients NoSQL, ... I would like to have in PHP 7, a new serialization algorithm or custom handler to serialize. My opinion is that the best choice is to use msgpack, it is +110% faster -30% data size HHVM discuss

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Paul Dragoonis
I clearly didn't google, it would be interesting to see comparisons of high speed PHP serialization libraries. I for one would be happy, in PHP 7, to break BC serialization syntax in favour of putting in a much faster serializer by default. Similar scenario to putting in Zend OpCache by default ins

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Pierre Joye
http://pecl.php.net/package/msgpack On Tue, Sep 23, 2014 at 1:34 PM, Leigh wrote: > On 23 September 2014 12:22, Paul Dragoonis wrote: >> Write an extension for it then, also share your benchmarks :) >> > > Why go to all that trouble, 10 seconds on Google and we have: > > https://github.com/msgpa

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Leigh
On 23 September 2014 12:22, Paul Dragoonis wrote: > Write an extension for it then, also share your benchmarks :) > Why go to all that trouble, 10 seconds on Google and we have: https://github.com/msgpack/msgpack-php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Paul Dragoonis
Write an extension for it then, also share your benchmarks :) On Tue, Sep 23, 2014 at 12:17 PM, Park Framework wrote: > Performance testing, Msgpack VS Igbinary > > igbinary: -20% slower, data size ~5% > > Advantage Msgpack, he works fast, and this format understood by many > technologies - Java

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Park Framework
Performance testing, Msgpack VS Igbinary igbinary: -20% slower, data size ~5% Advantage Msgpack, he works fast, and this format understood by many technologies - Java, Python, Lua in Redis. 2014-09-23 12:20 GMT+03:00 Paul Dragoonis : > Hi , > > Backwards compatibility is one hurdle, but if you

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-23 Thread Paul Dragoonis
Hi , Backwards compatibility is one hurdle, but if you wipe all your serialised data then begin to re-serialise using the new approach then you're fine. As for what to use msgpack or igbinary, well there's already good support for igbinary in PHP thanks to Pierre and others. You should benchmark

Re: [PHP-DEV] Improve PHP 7 serialization

2014-09-22 Thread Pierre Joye
On Sep 23, 2014 1:23 AM, "Park Framework" wrote: > > PHP serialization is slowest in PHP Session, clients NoSQL, ... > I would like to have in PHP 7, a new serialization algorithm or custom > handler to serialize. The latter is already possible and there are many good extensions doing that. Igbin

[PHP-DEV] Improve PHP 7 serialization

2014-09-22 Thread Park Framework
PHP serialization is slowest in PHP Session, clients NoSQL, ... I would like to have in PHP 7, a new serialization algorithm or custom handler to serialize. My opinion is that the best choice is to use msgpack, it is +110% faster -30% data size HHVM discussed this issue, but all boils down to bac