Skip to content
This repository was archived by the owner on Sep 12, 2022. It is now read-only.

Conversation

@joshuaadickerson
Copy link

This creates an array instead of using a serialized object for the cache. This should be more efficient.

This creates an array instead of using a serialized object for the cache. This should be more efficient.
I didn't realize I had to support PHP 5.3
@tmotyl
Copy link

tmotyl commented Dec 23, 2016

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.

@joshuaadickerson
Copy link
Author

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.

@tmotyl
Copy link

tmotyl commented Dec 28, 2016

@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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants