This is an extension of #951838: Remove serialize() when it is not needed..

Is there any reason to handle object and header serialization in the module instead of passing it to APC? If not, getting rid of a couple lines of code allows APC to handle everything - headers and data.

IMO, the best reason for doing this is to use igbinary as APC's serialization handler.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pounard’s picture

Subscribe, I think this is the good way to go: you should use APC internals whenever possible, it will always be faster than PHP code itself.

pounard’s picture

Status: Active » Needs review
FileSize
2.08 KB

Provided patch wasn't applyable on the 7.x-1.x-dev git clone, fixed it.

The provided patch works great and do make my testing site a few millisec faster (beware of figures, it's highly environment dependent, but it works great for me).

R.Muilwijk’s picture

R.Muilwijk’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

JGO’s picture

what about igbinary serialization support? Wouldn't that be possible ? Or will it automatically with this patch if APC is enabled ?

R.Muilwijk’s picture

This is not handled by the drupal apc module. We just pass on the variables to APC which serializes them internally.

pounard’s picture

If I remember correctly, APC uses PHP serialization mecanism to serialize stuff.

rbayliss’s picture

APC has it's own serialization setting, which is set in an INI file using the apc.serializer key. This issue was simply about removing all serialize/unserialize calls from the code, and allowing APC to use this serialization handler.

Example:
;Use igbinary as serializer in APC cache (3.1.7 or later)
apc.serializer=igbinary

pounard’s picture

Right, I think I mistook it with memcached PHP extension which uses PHP built-in per default.