Whenever you need to save (freeze) an object, it needs to be serialized. It does not depend on the storage (APC, session files, databases, etc.), because the script process will end, and the next time it starts, the objects will come to life again.
Thus, things cannot be stored in the "execution state"; objects will always be serialized for storage.
PHP serialization is not known to be the fastest. There are alternative implementations; you can use, for example, the igbinary PHP Extension . It offers a serialization / deserialization function along with transparent session processing. Perhaps this is really useful for your scenario.
In any case: the more you store inside the session, the more you need to defrost or wake up at the beginning of the request, the more time it will take.
Related: What is php_binary serialization handler?
hakre source share