[wp-hackers] json_encode/decode VS serialization
Ryan McCue
lists at rotorised.com
Sun May 22 03:29:24 UTC 2011
Nathan Rice wrote:
> Has anyone done any research into this, and is there any chance (assuming
> reads would be faster with json_decode) that WordPress would switch to this
> method over (un)serialize? Seems like it would at least be worth some
> consideration.
I've done research into this for my own projects, and
json_encode/json_decode is *slightly* faster than serialize/unserialize,
but unless you've got 10k+ objects in a list, it's really not worth it.
(FWIW, I use json_encode/json_decode personally, since I'm storing 100k+
objects in a list. It's still only slightly faster, and certainly not
worth rewriting everything.)
--
Ryan McCue
<http://ryanmccue.info/>
More information about the wp-hackers
mailing list