There is some very cool serialization alternatives out there, the coolest is igbinary, it much faster an save space...
It would be cool if there will be an option to switch serialization function...
maybe in main app config... serialize or json_encode, or igbinary etc.
Don't sure if it will save much time, but maybe at least space
Page 1 of 1
different serialization
#1
Posted 13 September 2011 - 04:12 PM
Certification:

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)
#2
Posted 13 September 2011 - 06:25 PM
Fore reference: I think this is referring to this project.
Well, it looks promising. The only problem I see so far is that igbinary is producing binary output. That's a bit hard to debug and some components (CDbHttpSession and CDbCache) will need adjustment to cope with the binary format. Anyway: Thanks for the hint.
Well, it looks promising. The only problem I see so far is that igbinary is producing binary output. That's a bit hard to debug and some components (CDbHttpSession and CDbCache) will need adjustment to cope with the binary format. Anyway: Thanks for the hint.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
#3
Posted 14 September 2011 - 06:13 AM
I would stick to serialize or json... maybe you could benchmark them (both serialize/unserialize json_encode/json_decode and use the faster one).
Yii user #37
#4
Posted 14 September 2011 - 08:54 AM
I did a little benchmark, I tested var_export with return cache, serialization, json_encode, igbinary...
igbinary kick *ss
he is about twice faster than all the variations, and he saves about 50% space. if serialization result take 80, igbinary would produce 40...
I hope I dont lay to you... it was half year ago.. now I use only igbinary...
I did a little tutorial for caching main.php
there you have the example and reference to github , as Sourcerer posted
http://www.yiiframew...onfig-main-php/
igbinary kick *ss
I hope I dont lay to you... it was half year ago.. now I use only igbinary...
I did a little tutorial for caching main.php
there you have the example and reference to github , as Sourcerer posted
http://www.yiiframew...onfig-main-php/
Certification:

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)

Test Yii:
Yii Framework Demos
Wiki:
Common Yii Questions
Tutorials:
Demo Blog Search with Zend_Lucene
Fundamentals:
Yii "registry" | Understanding the layout->view randering flow
Etc:
Shrink Yii | Caching config/main.php | CPhpAuthManager - how it works, and when to use it
Extensions:
Theme Picker | Language Picker (i18n)
#5
Posted 15 September 2011 - 03:03 AM
I actually managed to find a very recent benchmark. At the same time I've been experimenting a bit with compressed sessions, resulting in a more general compression approach (it's not ready for a patch, yet). In my experience, the output of PHP's native serialize() compresses really well. Serialized data passed through gzip/lzf tends to be even smaller than igbinary's output. However, it will add some CPU overhead. I'll have to run some benchmarks but my guess is: igbinary is the faster approach while gzip(serialize()) leads to smaller sessions.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
#6
Posted 16 September 2011 - 05:59 AM
I'd would use a human readable approach, not some non-standard binary approach.
Yii user #37
#7
Posted 08 June 2012 - 05:02 AM
Oh, here's that thread
Just a small addition: Set igbinary.compact_strings to Off for a greater speed benefit. This will result into larger serialization strings (don't worry, they're still smaller than PHP's serialize() output). But I've found that the speed advantage is lost in a lot of circumstances.
Just a small addition: Set igbinary.compact_strings to Off for a greater speed benefit. This will result into larger serialization strings (don't worry, they're still smaller than PHP's serialize() output). But I've found that the speed advantage is lost in a lot of circumstances.
programmer /ˈprəʊgramə/, noun: a device that converts ►coffee into ►code
#8
Posted 10 June 2012 - 10:04 PM
I think the point is to support different serializer to drop in , adapt in, not on which is better and faster.
Share this topic:
Page 1 of 1

Help

This topic is locked












