Open joshuaadickerson opened 7 years ago
Hi When I did performance test back then (2013) comparing different scenarios (including php file, php serializing , json encode etc) the one used here was the fastest. So deserializing was faster than including PHP file (meaning php has to load the file, parse it and interpret).
It would be quite interesting to see the performance test on the current PHP 7, to see if this change gives any performance improvement at all.
Benchmarks know best, but that is illogical to me. PHP has to unserialize the string before it can use it. Whereas with a PHP file, APC will cache it as a file and PHP will use it as a file. The individual process doesn't have to do any work. It will probably take longer to create the string, but read performance is much more important than write.
@joshuaadickerson I'm sure you agree that it doesn't make sense to argue about the feeling what "should" be faster and why. Please provide benchmark proving your solution is faster then the current one. Thanks
This creates an array instead of using a serialized object for the cache. This should be more efficient.