Just a slightly crazy thought. The file cache serializes content and unserializes it later on.
I wonder if it is safe and better performing to json_encode it instead. Only if native json_encode is available, of course. I did a test a while ago and for the data set I had (large arrays, of arrays of numbers), unserialize was significantly slower than json_decode for my data.
We don't serialize resources or object instances in the base software (there is no reason for us to do so), so from my perspective I see no real reason why we can't do that. If native functions are not available, then we use serialize as normal.
Thoughts?
I wonder if it is safe and better performing to json_encode it instead. Only if native json_encode is available, of course. I did a test a while ago and for the data set I had (large arrays, of arrays of numbers), unserialize was significantly slower than json_decode for my data.
We don't serialize resources or object instances in the base software (there is no reason for us to do so), so from my perspective I see no real reason why we can't do that. If native functions are not available, then we use serialize as normal.
Thoughts?